最不爱吃鱼

关注

phpunit: This test did not perform any assertions

最不爱吃鱼

关注

阅读 162

2022-02-12


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';
}
}


参考
PHPUnit passing a test with no assertions within config




相关推荐

Sophia的玲珑阁

pathspec 'hwOrganizationCotroller.java' did not match any files

Sophia的玲珑阁 58 0 0

大雁f

The selection did not contain any resources that can run on a server.

大雁f 159 0 0

捌柒陆壹

fatal: pathspec ‘readme.txt‘ did not match any files

捌柒陆壹 84 0 0

栖桐

centos linux安装PHPUnit 配置PHPUnit (深入浅出PHPUnit 1)

栖桐 124 0 0

吴wuwu

PHPUnit 手册【笔记】

吴wuwu 124 0 0

全栈顾问

[PHP]如何安装phpunit

全栈顾问 118 0 0

夕颜合欢落

IELTS12 Test5 It is good to share as much information as possible in any areas

夕颜合欢落 178 0 0

小猪肥

1697_python编程_assertions and exceptions

小猪肥 67 0 0

数数扁桃

【Azure 事件中心】Event Hub 无法连接,出现 Did not observe any item or terminal signal within 60000ms in

数数扁桃 38 0 0

祈澈菇凉

test test

祈澈菇凉 105 0 0

精彩评论(0)

0 0 举报