/**
  * @covers Veles\ErrorHandler\Subscribers\ErrorRenderer::update
  */
 public function testUpdate()
 {
     $builder = new ErrorBuilder();
     $builder->setTemplate('Errors/exception.phtml');
     $exception = new \Exception($this->message);
     $handler = new ExceptionHandler();
     $handler->run($exception);
     $this->expectOutputString($this->html);
     $this->object->setMessageBuilder($builder);
     $this->object->update($handler);
 }
 /**
  * @covers Veles\ErrorHandler\Subscribers\EmailNotifier::update
  */
 public function testUpdate()
 {
     $stub = $this->getMockBuilder('\\Veles\\ErrorHandler\\Subscribers\\EmailNotifier')->setMethods(['getMessageBuilder', 'init', 'send'])->getMock();
     $builder = new ErrorBuilder();
     $builder->setTemplate('Errors/exception.phtml');
     $stub->method('getMessageBuilder')->willReturn($builder);
     $stub->expects($this->once())->method('init')->willReturn(null);
     $stub->expects($this->once())->method('send')->willReturn(null);
     $exception = new \Exception($this->message);
     $handler = new ExceptionHandler();
     $handler->run($exception);
     $stub->update($handler);
 }
 /**
  * @covers Veles\ErrorHandler\HtmlBuilders\ErrorBuilder::getTemplate
  * @depends testSetTemplate
  */
 public function testGetTemplate()
 {
     $expected = uniqid();
     $this->object->setTemplate($expected);
     $result = $this->object->getTemplate();
     $msg = 'ErrorBuilder::setTemplate() wrong behavior!';
     $this->assertSame($expected, $result, $msg);
 }