public function testBeforeDispatchWithException() { $exception = new LocalizedException(new Phrase('Phrase')); $this->themeRegistration->expects($this->once())->method('register')->willThrowException($exception); $this->logger->expects($this->once())->method('critical'); $this->plugin->beforeDispatch($this->abstractAction, $this->request); }
public function testBeforeExecuteWithException() { $exception = new LocalizedException(new Phrase('Phrase')); $this->themeRegistration->expects($this->once())->method('register')->willThrowException($exception); $this->logger->expects($this->once())->method('critical'); $object = new Registration($this->themeRegistration, $this->logger, $this->appState); $object->beforeExecute($this->abstractAction, $this->request); }