phpunit中的分组测试
首先确保你的代码像这样:
<?php class TestTest extends PHPUnit_Framework_TestCase{ /** * @group a */ public function testOne() { } /** * @group a * @group b */ public function testTwo() { } } ?>
sb@vmware ~ % phpunit --group a TestTest
PHPUnit 3.2.0-dev by Sebastian Bergmann.
Time: 0 seconds
OK (2 tests)
sb@vmware ~ % phpunit --group b TestTest
PHPUnit 3.2.0-dev by Sebastian Bergmann.
Time: 0 seconds
OK (1 test)