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';
    }
}
相关文章
|
7月前
|
设计模式 人工智能 Java
Error: JavaFX runtime components are missing, and are required to run this application with Gradle e
Error: JavaFX runtime components are missing, and are required to run this application with Gradle e
242 1
|
6月前
|
编译器
“Could not determine which ”make“ command to run. Check the ”make“ step in the build configuration.”
“Could not determine which ”make“ command to run. Check the ”make“ step in the build configuration.”
|
Java Maven
Maven配置报错The JAVA_HOME environment variable is not defined correctly
Maven配置报错The JAVA_HOME environment variable is not defined correctly
232 1
|
7月前
|
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
|
7月前
selenium.common.exceptions.InvalidElementStateException: Message: Unable to perform W3C actions.
selenium.common.exceptions.InvalidElementStateException: Message: Unable to perform W3C actions.
100 0
|
7月前
selenium.common.exceptions.InvalidElementStateException Message Unable to perform W3C actions
selenium.common.exceptions.InvalidElementStateException Message Unable to perform W3C actions
114 0
Junit报错java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=test]的解决
Junit报错java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=test]的解决
81 0
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages
|
Java Maven
Error running ‘ssm [clean]‘: No valid Maven installation found. Either set the home directory in the
Error running ‘ssm [clean]‘: No valid Maven installation found. Either set the home directory in the
127 0
configure: error: Package requirements (commoncpp 6.2.2) were not met
configure: error: Package requirements (commoncpp 6.2.2) were not met
86 0