Ahmadz Issa
Ahmadz Issa

Reputation: 765

Laravel phpunit undefined assertResponseOk() method

Whenever I try to use assertResponseOk() I get this error

Fatal error: Call to undefined method Tests\Unit\LessonsTest::assertResponseOk() in /home/faasdril/public_html/test/tests/Unit/LessonsTest.php on line 19

I can use other assertion methods and I've extended TestCase class correctly

I'm using latest version of laravel

Upvotes: 1

Views: 1992

Answers (1)

sisve
sisve

Reputation: 19781

That method is no longer available in Laravel 5.4. From the upgrade notes:

Laravel 5.4's testing layer has been re-written to be simpler and lighter out of the box. If you would like to continue using the testing layer present in Laravel 5.3, you may install the laravel/browser-kit-testing package into your application.

Upvotes: 3

Related Questions