| @@ 156-164 (lines=9) @@ | ||
| 153 | /** |
|
| 154 | * @test |
|
| 155 | */ |
|
| 156 | public function willSetResponseWithVndErrorHeader() |
|
| 157 | { |
|
| 158 | foreach ([400, 500] as $code) { |
|
| 159 | $this->codeProperty->setValue($this->exception, $code); |
|
| 160 | $this->exceptionListener->onKernelException($this->event); |
|
| 161 | $response = $this->event->getResponse(); |
|
| 162 | $this->assertContains('application/vnd.error', $response->headers->get('Content-Type')); |
|
| 163 | } |
|
| 164 | } |
|
| 165 | ||
| 166 | /** |
|
| 167 | * @test |
|
| @@ 169-177 (lines=9) @@ | ||
| 166 | /** |
|
| 167 | * @test |
|
| 168 | */ |
|
| 169 | public function willSetResponseWithValidJsonContent() |
|
| 170 | { |
|
| 171 | foreach ([400, 500] as $code) { |
|
| 172 | $this->codeProperty->setValue($this->exception, $code); |
|
| 173 | $this->exceptionListener->onKernelException($this->event); |
|
| 174 | $response = $this->event->getResponse(); |
|
| 175 | $this->assertNotNull(json_decode($response->getContent())); |
|
| 176 | } |
|
| 177 | } |
|
| 178 | ||
| 179 | /** |
|
| 180 | * @test |
|
| @@ 196-204 (lines=9) @@ | ||
| 193 | /** |
|
| 194 | * @test |
|
| 195 | */ |
|
| 196 | public function willSetResponseWithLogRef() |
|
| 197 | { |
|
| 198 | foreach ([400, 500] as $code) { |
|
| 199 | $this->codeProperty->setValue($this->exception, $code); |
|
| 200 | $this->exceptionListener->onKernelException($this->event); |
|
| 201 | $response = $this->event->getResponse(); |
|
| 202 | $this->assertNotNull(json_decode($response->getContent())->logref); |
|
| 203 | } |
|
| 204 | } |
|
| 205 | ||
| 206 | /** |
|
| 207 | * @test |
|