您当前的位置: 首页 > 慢生活 > 程序人生 网站首页程序人生
phpunit-phpunit.xml-phpunit-stopOnError
发布时间:2021-10-11 22:51:04编辑:雪饮阅读()
如果一个测试方法出现了错误,那么phpunit会不会继续测试下一个测试方法?还是直接停止测试?
use PHPUnit\Framework\TestCase;
use PHPUnit\TextUI\ResultPrinter;
use PHPUnit\TextUI\DefaultResultPrinter;
final class MyTest extends TestCase
{
public function testOne(): void
{
trigger_error("E_ERROR",E_ERROR );
$this->assertTrue(true);
}
public function testTwo(): void
{
trigger_error("E_USER_ERROR",E_USER_ERROR);
$this->assertTrue(true);
}
public function testThree(): void
{
$this->assertTrue(true);
}
}
同样的测试:
</phpunit>
关键字词:phpunit,stopOnError
相关文章
- phpunit-phpunit.xml-phpunit-printerClass与printerF
- phpunit-phpunit.xml-phpunit-processIsolation
- phpunit-phpunit.xml-phpunit-forceCoversAnnotation
- phpunit-phpunit.xml-phpunit-convertWarningsToExcep
- phpunit-phpunit.xml-phpunit-convertNoticesToExcept
- phpunit-phpunt.xml-phpunit-convertErrorsToExceptio
- phpunit-phpunit.xml-phpunit-convertDeprecationsToE
- phpunit-phpunit.xml-phpunit-columns
- phpunit-phpunit.xml-phpunit-backupStaticAttributes
- phpunit-phpunit.xml-backupGlobals的覆盖