Esempio n. 1
0
 public function testShouldHaveTheFirstErrorMessage()
 {
     $response = Response::create(HttpMethod::GET(), '1.2', true, HttpErrorCode::code412(), [Error::create('first error', 'Error'), Error::create('second error', 'Error')]);
     $this->assertSame('first error', $response->getErrorMessage()->getValue());
     $response = Response::create(HttpMethod::GET(), '1.2', true, HttpErrorCode::code412());
     $this->assertSame('', $response->getErrorMessage()->getValue());
 }
Esempio n. 2
0
 public function testShouldHaveACODE_412()
 {
     $this->assertSame(HttpErrorCode::CODE_412, HttpErrorCode::code412()->getValue());
 }