phpunit: This test did not perform any assertions

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

上一篇:mysql数据库3


下一篇:汽车UDS诊断详解及Vector相关工具链使用说明——7.9 动态定义DID(0x2C)