Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 769 Bytes

testing.md

File metadata and controls

39 lines (26 loc) · 769 Bytes

Testing

For unit tests use PHPSpec tests, for functional tests use PHPUnit and Behat for integration.

How to run tests?

php bin/phpunit # PHPUnit
php bin/phpspec run # PHPSpec

To see current code tests coverage run:

For PHPSpec copyphpspec.yml.dist to phpspec.yml and uncomment:

#extensions:
#    - PhpSpec\Extension\CodeCoverageExtension

#code_coverage:
#    output: build/coverage
#    format: html

and re-run PHPSpec.

For PHPUnit:

php bin/phpunit --coverage-text

Send code coverage raport to codecov.io with:

bash <(curl -s https://codecov.io/bash) -t 9774e0ee-fd3e-43d3-8ba6-a25e4ef57fe5

Note: remember to enable Xdebug to generate the coverage.