I have a PHP deployment script that I want to run PHPUnit tests first, and stop if the tests fail. I've been googling this a lot, and it's very hard to find documentation on running unit tests from php, rather than from the command line tool.
For the newest version of PHPUnit, can you do something like:
$unit_tests = new PHPUnit('my_tests_dir');
$passed = $unit_tests->run();
Preferably a solution that doesn't require me to manually specify each test suite.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…