Neos\ContentRepository\Tests\Unit\Domain\Model\WorkspaceTest::publishNodeWithANodeInTheTargetWorkspaceShouldDoNothing PHP Метод

publishNodeWithANodeInTheTargetWorkspaceShouldDoNothing() публичный Метод

    public function publishNodeWithANodeInTheTargetWorkspaceShouldDoNothing()
    {
        $liveWorkspace = new Workspace('live');
        $personalWorkspace = new Workspace('user-admin', $liveWorkspace);
        $nodeDataRepository = $this->getMockBuilder(NodeDataRepository::class)->disableOriginalConstructor()->getMock();
        $this->inject($liveWorkspace, 'nodeDataRepository', $nodeDataRepository);
        $node = $this->createMock(NodeInterface::class);
        $node->expects($this->any())->method('getWorkspace')->will($this->returnValue($liveWorkspace));
        $nodeDataRepository->expects($this->never())->method('findOneByIdentifier');
        $personalWorkspace->publishNode($node, $liveWorkspace);
    }