Neos\ContentRepository\Tests\Unit\Domain\Service\NodeTypeManagerTest::prepareNodeTypeManager PHP Метод

prepareNodeTypeManager() защищенный Метод

Prepares $this->nodeTypeManager with a fresh instance with all mocks and makes the given fixture data available as NodeTypes configuration
protected prepareNodeTypeManager ( array $nodeTypesFixtureData )
$nodeTypesFixtureData array
    protected function prepareNodeTypeManager(array $nodeTypesFixtureData)
    {
        $this->nodeTypeManager = new NodeTypeManager();
        $this->mockConfigurationManager = $this->getMockBuilder(ConfigurationManager::class)->disableOriginalConstructor()->getMock();
        $mockCache = $this->getMockBuilder(StringFrontend::class)->disableOriginalConstructor()->getMock();
        $mockCache->expects($this->any())->method('get')->willReturn(null);
        $this->inject($this->nodeTypeManager, 'fullConfigurationCache', $mockCache);
        $this->mockConfigurationManager->expects($this->any())->method('getConfiguration')->with('NodeTypes')->will($this->returnValue($nodeTypesFixtureData));
        $this->inject($this->nodeTypeManager, 'configurationManager', $this->mockConfigurationManager);
    }