Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

License

NotificationsYou must be signed in to change notification settings

wkhayrattee/php-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Theinit 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$ maketest$ make install

Enabling PCOV

  1. Note the/path/to/the/pcov.so on your CLI just after the executing themake 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.sopcov.enabled = 1

For list of values to customise inphp.ini, seethis doc here

Executing the Test Coverage:

$ vendor/bin/pest --coverage

With report format

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

References & Recommended Resources

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp