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';
    }
}
相关文章
|
JavaScript 前端开发 测试技术
【软件使用】postman使用教程
【软件使用】postman使用教程
|
PHP 数据安全/隐私保护
在PHP中使用AES进行加密和解密
在PHP中使用AES进行加密和解密
818 0
|
Web App开发 Linux 开发工具
Centos7 yum 安装chrome
Centos7 yum 安装chrome配置yum源vim /etc/yum.repos.d/google-chrome.repo写入以下内容[google-chrome]name=google-chromebaseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearchenabled=1gpgcheck=1gpgkey=http...
912 0
|
Ubuntu Shell 开发工具
Ubuntu 20.04 安装nvm
Ubuntu 20.04 安装nvm
6959 0
|
11月前
|
JSON JavaScript 测试技术
Postman 使用教程:从基础到高级
Postman是一款强大的API开发和测试工具,支持从基础请求发送到复杂API集成。本文详细介绍了Postman的基础使用,包括安装、界面概览、发送请求、设置请求头等,以及高级功能,如使用环境变量、创建请求集合、编写测试脚本及使用Newman进行命令行测试,帮助用户全面掌握Postman的使用技巧。
4679 28
Postman 使用教程:从基础到高级
|
机器学习/深度学习 人工智能 运维
电话机器人源码-智能ai系统-freeswitch-smartivr呼叫中心-crm
电话机器人源码-智能ai系统-freeswitch-smartivr呼叫中心-crm
462 0
IDEA如何设置取消 请不要使用行尾注释 提示
文章介绍了如何在 IntelliJ IDEA 中设置以取消行尾注释的提示。这个问题通常由使用阿里规范插件导致,插件会在不满足规范时在代码中显示黄色波浪线提示。为了改善代码编辑体验,文章提供了详细的步骤说明,指导用户通过进入 "File" -> "Settings" -> "Editor" -> "Inspections" 来取消特定检查项,从而消除这些提示。修改设置后,代码界面将不再显示黄色波浪线,看起来更加清爽。
IDEA如何设置取消 请不要使用行尾注释 提示
|
Web App开发 Linux Python
linux上安装selenium环境及测试
该文章提供了在Linux CentOS上安装Selenium环境、Chrome浏览器及Chromedriver的详细步骤,并演示了如何以无头模式进行测试。
1097 0
|
缓存 Java API
【Azure 服务总线】详解Azure Service Bus SDK中接收消息时设置的maxConcurrentCalls,prefetchCount参数
【Azure 服务总线】详解Azure Service Bus SDK中接收消息时设置的maxConcurrentCalls,prefetchCount参数
199 0