| @@ 231-243 (lines=13) @@ | ||
| 228 | /** |
|
| 229 | * @test |
|
| 230 | */ |
|
| 231 | public function shouldHandleException() |
|
| 232 | { |
|
| 233 | /** @var Exception $exception */ |
|
| 234 | $exception = $this->createMock('Exception'); |
|
| 235 | $exception->method('__toString')->willReturn("some-string"); |
|
| 236 | ||
| 237 | $this->logger->expects($this->once())->method('log')->with( |
|
| 238 | $this->equalTo('error'), |
|
| 239 | $this->identicalTo('some-string') |
|
| 240 | ); |
|
| 241 | ||
| 242 | $this->controllerHelper->handleException($exception); |
|
| 243 | } |
|
| 244 | ||
| 245 | /** |
|
| 246 | * @test |
|
| @@ 248-260 (lines=13) @@ | ||
| 245 | /** |
|
| 246 | * @test |
|
| 247 | */ |
|
| 248 | public function shouldAddFlashMessage() |
|
| 249 | { |
|
| 250 | /** @var FlashBagInterface $flashBag */ |
|
| 251 | $flashBag = $this->createMock(FlashBagInterface::class); |
|
| 252 | $flashBag->expects($this->once())->method('add')->with( |
|
| 253 | $this->equalTo('some-type'), |
|
| 254 | $this->equalTo("Lorem ipsum dolor sit amet!") |
|
| 255 | ); |
|
| 256 | ||
| 257 | $this->session->method('getFlashBag')->willReturn($flashBag); |
|
| 258 | ||
| 259 | $this->controllerHelper->addFlashMessage("Lorem ipsum dolor sit amet!", "some-type"); |
|
| 260 | } |
|
| 261 | ||
| 262 | /** |
|
| 263 | * @test |
|