phpunit 没有使用断言语句测试不通过,
This test did not perform any assertions
如果仅仅想执行单个函数,不想加断言,可以使用注解
<?php use PHPUnit\Framework\TestCase; class Test extends TestCase { /** * @doesNotPerformAssertions */ public function testDefault(){ echo 'empty:' . empty(0); } }
参考
PHPUnit passing a test with no assertions within config