I am just testing my laravel app with phpunit
When i run vendor/bin/phpunit
i am getting error like below Error: Call to undefined method ExampleTest::assertStatus()
Below is the code i was trying to execute
$response = $this->json('POST', '/users', ['customer_name' => 'Ratke-Harris']);
$response
->assertStatus(200)
->assertExactJson([
'created' => true,
]);
As per the laravel docs , even there they have mentioned the same example. I don't understand why it is throwing error.
Any ideas ? Please.