定制 wkhayrattee/php-utils 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wkhayrattee/php-utils

Composer 安装命令:

composer require wkhayrattee/php-utils

包简介

A list of reusable functions to use across PHP projects, with Test cases

关键字:

README 文档

README

A list of reusable functions to use across PHP projects, with Test cases

Testing With PEST

Installing PEST

$ composer require pestphp/pest --dev --with-all-dependencies

$ vendor/bin/pest --init

The init command will create the following files & folders as mentioned in the output:

   DONE  Created `tests` directory.
   DONE  Created `phpunit.xml` file.
   DONE  Created `tests/Pest.php` file.
   DONE  Created `tests/ExampleTest.php` file.

   DONE  Pest initialised.

Test Code Coverage aka PCOV

Installing PCOV

$ git clone https://github.com/krakjoe/pcov.git
$ cd pcov
$ phpize
$ ./configure --enable-pcov
$ make
$ make test
$ make install

Enabling PCOV

  1. Note the /path/to/the/pcov.so on your CLI just after the executing the make install command
  2. Add the below on your CLI's php.ini (since we are using cli and not web)
[pcov]
extension=/usr/lib/php/20210902/pcov.so
pcov.enabled = 1

For list of values to customise in php.ini, see this doc here

Executing the Test Coverage:

$ vendor/bin/pest --coverage

With report format

$ vendor/bin/pest --coverage --testdox

References & Recommended Resources

统计信息

  • 总下载量: 1.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2022-10-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固