protected function setUp() { $this->nodeManager = $this->getMockBuilder('Tadcka\\Component\\Tree\\Model\\Manager\\NodeManagerInterface')->disableOriginalConstructor()->getMock(); $this->nodeManager->expects($this->any())->method('create')->willReturn($this->getMock('Tadcka\\Component\\Tree\\Model\\NodeInterface')); $this->treeProvider = $this->getMockBuilder('Tadcka\\Component\\Tree\\Provider\\TreeProviderInterface')->disableOriginalConstructor()->getMock(); $this->sitemapProvider = new SitemapProvider($this->nodeManager, $this->treeProvider); }
/** * {@inheritdoc} */ protected function setUp() { $this->nodeManager = $this->getMock('Tadcka\\Component\\Tree\\Model\\Manager\\NodeManagerInterface'); $this->nodeManager->expects($this->any())->method('findExistingNodeTypes')->will($this->returnValue(array('test', 'mock', 'fake'))); $this->nodeTypeRegistry = $this->getMock('Tadcka\\Component\\Tree\\Registry\\NodeType\\NodeTypeRegistry'); $this->nodeTypeRegistry->expects($this->any())->method('getConfigs')->will($this->returnValue(array(new NodeTypeConfig('Test', 'test'), new NodeTypeConfig('Mock', 'mock', array('test'), true)))); $this->nodeValidator = new NodeValidator($this->nodeManager, $this->nodeTypeRegistry); }