0
我只是在测试我的laravel应用程序使用PHPUnit 当我运行vendor/bin/phpunit
我收到错误,如下面Error: Call to undefined method ExampleTest::assertStatus()
Laravel PHP单元测试
下面是代码我试图执行
$response = $this->json('POST', '/users', ['customer_name' => 'Ratke-Harris']);
$response
->assertStatus(200)
->assertExactJson([
'created' => true,
]);
按laravel文档,即使在那里他们也提到了相同的例子。我不明白它为什么会抛出错误。
任何想法?请。