Example #1
0
 public function testWasSuccess()
 {
     $response = new Response('200', json_encode([]));
     $this->assertTrue($response->wasSuccess(), "Response with 200 code should be success.");
     $response = new Response('404', json_encode([]));
     $this->assertFalse($response->wasSuccess(), "Response with 404 code should not be success.");
     $response = new Response('500', json_encode([]));
     $this->assertFalse($response->wasSuccess(), "Response with 500 code should not be success.");
 }