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()); }
public function testShouldHaveACODE_412() { $this->assertSame(HttpErrorCode::CODE_412, HttpErrorCode::code412()->getValue()); }