Class TipyTestRunner
Run tests and print summary
$runner = new TipyTestRunner(); $exitCode = $runner->run(); exit($exitCode);
./bin/test
tipy comes with a script to execute tests in your application's tests directory
Let's say tipy is installed with Composer in vendor directory. Then you can run from your application root directory:
./vendor/tipy/tipy/bin/test tests/
TipyTestRunner will find all tests and fixtures in tests/ directory recursively and execute them.
If you want to run specific test case or use specific fixture file you can specify them as arguments. Tipy recognize test by filename ( *Test.php) and fixture by .sql extension. More than one tests and fixtures are allowed.
./vendor/tipy/tipy/bin/test tests/SpecificTest.php tests/fixtures/specific.sql
config.ini
You can specify different config files for production mode and for tests Tipy will look for config.ini
- first in tests directory
- then in application root directory
autoload.php
By default tipy uses your application's autoload.php located in app directory. But if you want to add some mocks for tests you can place one more autoload.php into tests directory and TipyTestRunner will use it also
public
integer
|
public
array
|
$fixtures
Paths to fixtures |
|
public
array
|
$skipDirs
Directory names to skip when looking for tests |
#
['.git', '.svn', 'vendor']
|