php - Laravel - PHPUnit simple test failed -


i don't understand... first test phpunit works fine. added new route , new method of course.

route::get( '/about', 'homecontroller@about' ); 

so, changed line inside exampletest:

public function testbasicexample()     {         $response = $this->call('get', '/about');          $this->assertequals(200, $response->getstatuscode());     } 

and gives me error: failed asserting 302 matches expected 200.

what doing wrong?

public function testbasicexample() {     $response = $this->call('get', '/about')->response;      $this->assertequals(200, $response->status()); } 

Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

java - Could not locate OpenAL library -

Non Unique Username with ASP.Net Identity 2.0 -