atk14 / tester
Easier way to run unit tests written in PHPUnit
Installs: 12 350
Dependents: 61
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.0
- phpunit/phpunit: ~4.8|~5.7|~6.0|~7.5
This package is auto-updated.
Last update: 2024-11-07 14:10:08 UTC
README
A test runner. Part of ATK14 Framework http://www.atk14.net/
Checking that all required dependencies are met:
$ run_unit_tests --check-dependencies && echo "ok"
# or
$ run_unit_tests -c && echo "ok"
In working directory it searches for tc_*.php files. Every of them loads and runs tests.
$ run_unit_tests
In file e.g. tc_currency.php it expects TcCurrency class (eventually tc_currency).
You can specify a list of test files to be executed
$ run_unit_tests tc_account tc_bank_transfer
eventually with .php suffix
$ run_unit_tests tc_account.php tc_bank_transfer.php
Dangerous tests
Sometimes you don't want to execute some test files automatically unless you specify them on command line. Prefix such files with exclamation mark.
$ run_unit_tests
$ run_unit_tests \!tc_gangerous_test_case.php
$ run_unit_tests '!tc_gangerous_test_case.php'
Automatization in testing
$ cd /path/to/test_files/ && run_unit_tests && echo "TESTS ARE OK" || echo "THERE WERE ERRORS"