/**
  * @covers \eZ\Publish\Core\MVC\Symfony\View\Provider\Configured::__construct
  * @covers \eZ\Publish\Core\MVC\Symfony\View\Provider\Configured::buildContentView
  * @covers \eZ\Publish\Core\MVC\Symfony\View\Provider\Block\Configured::getView
  */
 public function testGetViewContent()
 {
     $template = 'my_template.html.twig';
     $configHash = array('match' => array(), 'template' => $template);
     $this->matcherFactoryMock->expects($this->once())->method('match')->will($this->returnValue($configHash));
     $cvp = new BlockViewProvider($this->matcherFactoryMock);
     $view = $cvp->getView($this->getBlockMock(), 'full');
     $this->assertInstanceOf('eZ\\Publish\\Core\\MVC\\Symfony\\View\\ContentView', $view);
     $this->assertSame($configHash, $view->getConfigHash());
     $this->assertSame($template, $view->getTemplateIdentifier());
     $this->assertSame(array(), $view->getParameters());
 }
 /**
  * Returns the matcher object either from a service identifier or from a class.
  *
  * @param string $matcherIdentifier If it is a service identifier, the matcher will be built with the service container.
  *
  * @return \eZ\Publish\Core\MVC\Symfony\View\ContentViewProvider\Configured\Matcher
  */
 protected function getMatcher($matcherIdentifier)
 {
     if ($this->container->has($matcherIdentifier)) {
         return $this->container->get($matcherIdentifier);
     }
     return parent::getMatcher($matcherIdentifier);
 }
 /**
  * @covers \eZ\Publish\Core\MVC\Symfony\View\Provider\Block\Configured::match
  * @expectedException \InvalidArgumentException
  */
 public function testMatchWrongValueObject()
 {
     $matcherMock = $this->getMock('eZ\\Publish\\Core\\MVC\\Symfony\\View\\ContentViewProvider\\Configured\\Matcher');
     $wrongObject = $this->getMock('eZ\\Publish\\API\\Repository\\Values\\Content\\ContentInfo');
     $bvp = new BlockViewProvider($this->getRepositoryMock(), array());
     $bvp->match($matcherMock, $wrongObject);
 }