コード例 #1
0
 /**
  * @depends testApiProblemResponseIsAnHttpResponse
  */
 public function testApiProblemResponseSetsStatusCodeAndReasonPhrase()
 {
     $response = new ApiProblemResponse(new ApiProblem(400, 'Random error'));
     $this->assertEquals(400, $response->getStatusCode());
     $this->assertInternalType('string', $response->getReasonPhrase());
     $this->assertNotEmpty($response->getReasonPhrase());
     $this->assertEquals('bad request', strtolower($response->getReasonPhrase()));
 }