public function setUp()
 {
     $dbManager = $this->db('PHPCR');
     $dbManager->loadFixtures(array('Symfony\\Cmf\\Bundle\\CoreBundle\\Tests\\Resources\\DataFixture\\LoadHierarchyRouteData'));
     $this->publishWorkflowChecker = $this->getMock('Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationCheckerInterface');
     $this->publishWorkflowChecker->expects($this->any())->method('isGranted')->will($this->returnValue(true));
     $this->helper = new CmfHelper($this->publishWorkflowChecker);
     $this->helper->setDoctrineRegistry($dbManager->getRegistry(), 'default');
 }
 /**
  * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
  */
 public function testIsPublishedNoWorkflow()
 {
     $extension = new CmfHelper(null);
     $extension->setDoctrineRegistry($this->managerRegistry, 'foo');
     $extension->isPublished(new \stdClass());
 }