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

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -