phpunit: This test did not perform any assertions

简介: phpunit: This test did not perform any assertions

phpunit 没有使用断言语句测试不通过,

This test did not perform any assertions

如果仅仅想执行单个函数,不想加断言,可以使用注解


<?php
declare(strict_types=1);
use PHPUnit\Framework\TestCase;
class TokenServiceTest extends TestCase
{
    /**
     * @doesNotPerformAssertions
     */
    public function testGetToken(){
        echo 'hello';
    }
}
相关文章
Ninja is required to load C++ extensions | 问题解决
Ninja is required to load C++ extensions | 问题解决
|
5月前
|
JavaScript
解决报错did you register the component correctly? For recursive components, make sure to provide the “na
解决报错did you register the component correctly? For recursive components, make sure to provide the “na
|
10月前
Error: Plugin/Preset files are not allowed to export objects, only functions……
Error: Plugin/Preset files are not allowed to export objects, only functions……
|
11月前
|
安全 测试技术 网络安全
什么是 Penetration test
什么是 Penetration test
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages
【报错解决】ERROR: pip‘s dependency resolver does not currently take into account all the packages
【报错解决】ERROR: pip‘s dependency resolver does not currently take into account all the packages
2547 0
|
开发工具 git
编译pluma:configure.ac:229: error: required file ‘pluma/mate-submodules/Makefile.in‘ not found
编译pluma:configure.ac:229: error: required file ‘pluma/mate-submodules/Makefile.in‘ not found
118 0
No matching configuration of project :libusb was found.
No matching configuration of project :libusb was found.
590 0
configure: error: Package requirements (commoncpp 6.2.2) were not met
configure: error: Package requirements (commoncpp 6.2.2) were not met
79 0
configure: error: Library requirements (libpcre >= 7.8) not met
configure: error: Library requirements (libpcre >= 7.8) not met
129 0