Neos\ContentRepository\Tests\Unit\Domain\Factory\NodeFactoryTest::setUp PHP Метод

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

Prepare test objects
protected setUp ( )
    protected function setUp()
    {
        $this->nodeFactory = $this->getMockBuilder(NodeFactory::class)->setMethods(array('filterNodeByContext'))->getMock();
        $this->nodeFactory->expects(self::any())->method('filterNodeByContext')->willReturnArgument(0);
        $this->reflectionServiceMock = $this->createMock(ReflectionService::class);
        $this->reflectionServiceMock->expects(self::any())->method('getAllImplementationClassNamesForInterface')->with(NodeInterface::class)->willReturn(array(Node::class));
        $this->objectManagerMock = $this->createMock(ObjectManagerInterface::class);
        $this->objectManagerMock->expects(self::any())->method('get')->with(ReflectionService::class)->willReturn($this->reflectionServiceMock);
        $this->objectManagerMock->expects(self::any())->method('getClassNameByObjectName')->with(NodeInterface::class)->willReturn(Node::class);
        $this->inject($this->nodeFactory, 'objectManager', $this->objectManagerMock);
    }