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
Post a Comment