[英]AsserEquals not found in WebTestCase Symfony
I have a WebTestCase class: 我有一个WebTestCase类:
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Bundle\FrameworkBundle\Client;
class ApiAdminInvoiceControllerTest extends WebTestCase
{
public function test()
{
...
$this->assertArrayHasKey('id', $array);
...
}
}
I have this error in all asserts: Method 'assertArrayHasKey' not found
. 我在所有断言中都有这个错误:
Method 'assertArrayHasKey' not found
。
Try using PHPUnit\\Framework\\TestCase; 尝试使用PHPUnit \\ Framework \\ TestCase; as base class
作为基类
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.