Esempio n. 1
0
 /** @test */
 public function it_alllows_errors_to_be_arrays()
 {
     $errors = [['message' => 'Error', 'path' => '/foo']];
     $exception = new ErrorException($errors, 'Error', 100);
     $this->assertSame(400, $exception->getStatusCode());
     $this->assertJsonStringEqualsJsonString(json_encode(['message' => 'Error', 'logref' => 100, '_embedded' => ['errors' => [['message' => 'Error', 'path' => '/foo']]]]), $exception->getHal()->asJson());
 }