| @@ 192-204 (lines=13) @@ | ||
| 189 | /** |
|
| 190 | * @test |
|
| 191 | */ |
|
| 192 | public function shouldHandleException() |
|
| 193 | { |
|
| 194 | /** @var Exception $exception */ |
|
| 195 | $exception = $this->createMock('Exception'); |
|
| 196 | $exception->method('__toString')->willReturn("some-string"); |
|
| 197 | ||
| 198 | $this->logger->expects($this->once())->method('log')->with( |
|
| 199 | $this->equalTo('error'), |
|
| 200 | $this->identicalTo('some-string') |
|
| 201 | ); |
|
| 202 | ||
| 203 | $this->controllerHelper->handleException($exception); |
|
| 204 | } |
|
| 205 | ||
| 206 | /** |
|
| 207 | * @test |
|
| @@ 209-221 (lines=13) @@ | ||
| 206 | /** |
|
| 207 | * @test |
|
| 208 | */ |
|
| 209 | public function shouldAddFlashMessage() |
|
| 210 | { |
|
| 211 | /** @var FlashBagInterface $flashBag */ |
|
| 212 | $flashBag = $this->createMock(FlashBagInterface::class); |
|
| 213 | $flashBag->expects($this->once())->method('add')->with( |
|
| 214 | $this->equalTo('some-type'), |
|
| 215 | $this->equalTo("Lorem ipsum dolor sit amet!") |
|
| 216 | ); |
|
| 217 | ||
| 218 | $this->session->method('getFlashBag')->willReturn($flashBag); |
|
| 219 | ||
| 220 | $this->controllerHelper->addFlashMessage("Lorem ipsum dolor sit amet!", "some-type"); |
|
| 221 | } |
|
| 222 | ||
| 223 | /** |
|
| 224 | * @test |
|