public function setUp() { $this->vieSchemaBuilder = $this->getAccessibleMock('TYPO3\\Neos\\Service\\VieSchemaBuilder', array('dummy')); $mockConfigurationManager = $this->getMock('TYPO3\\Flow\\Configuration\\ConfigurationManager', array(), array(), '', FALSE); $mockConfigurationManager->expects($this->any())->method('getConfiguration')->with('NodeTypes')->will($this->returnValue($this->nodeTypesFixture)); $this->nodeTypeManager = $this->getAccessibleMock('TYPO3\\TYPO3CR\\Domain\\Service\\NodeTypeManager', array('dummy')); $this->nodeTypeManager->_set('configurationManager', $mockConfigurationManager); $this->vieSchemaBuilder->_set('nodeTypeManager', $this->nodeTypeManager); }
public function setUp() { $this->vieSchemaBuilder = $this->getAccessibleMock('TYPO3\\Neos\\Service\\VieSchemaBuilder', array('dummy')); $mockConfigurationManager = $this->getMock('TYPO3\\Flow\\Configuration\\ConfigurationManager', array(), array(), '', false); $mockConfigurationManager->expects($this->any())->method('getConfiguration')->with('NodeTypes')->will($this->returnValue($this->nodeTypesFixture)); $this->nodeTypeManager = $this->getAccessibleMock('TYPO3\\TYPO3CR\\Domain\\Service\\NodeTypeManager', array('dummy')); $this->nodeTypeManager->_set('configurationManager', $mockConfigurationManager); $mockCache = $this->getMock(\TYPO3\Flow\Cache\Frontend\StringFrontend::class, [], [], '', false); $mockCache->expects($this->any())->method('get')->willReturn(null); $this->nodeTypeManager->_set('fullConfigurationCache', $mockCache); $this->vieSchemaBuilder->_set('nodeTypeManager', $this->nodeTypeManager); }
public function setUp() { $this->vieSchemaBuilder = $this->getAccessibleMock(VieSchemaBuilder::class, array('dummy')); $mockConfigurationManager = $this->getMockBuilder(ConfigurationManager::class)->disableOriginalConstructor()->getMock(); $mockConfigurationManager->expects($this->any())->method('getConfiguration')->with('NodeTypes')->will($this->returnValue($this->nodeTypesFixture)); $this->nodeTypeManager = $this->getAccessibleMock(NodeTypeManager::class, array('dummy')); $this->nodeTypeManager->_set('configurationManager', $mockConfigurationManager); $mockCache = $this->getMockBuilder(StringFrontend::class)->disableOriginalConstructor()->getMock(); $mockCache->expects($this->any())->method('get')->willReturn(null); $this->nodeTypeManager->_set('fullConfigurationCache', $mockCache); $this->vieSchemaBuilder->_set('nodeTypeManager', $this->nodeTypeManager); }