Neos\ContentRepository\Tests\Functional\Domain\NodesTest::getPropertyDoesNotReturnNodeReferencesIfTheyAreNotVisibleAccordingToTheContentContext PHP Method

getPropertyDoesNotReturnNodeReferencesIfTheyAreNotVisibleAccordingToTheContentContext() public method

    public function getPropertyDoesNotReturnNodeReferencesIfTheyAreNotVisibleAccordingToTheContentContext()
    {
        $nodeTypeManager = $this->objectManager->get(NodeTypeManager::class);
        $nodeType = $nodeTypeManager->getNodeType('Neos.ContentRepository.Testing:NodeTypeWithReferences');
        $this->context = $this->contextFactory->create(['workspaceName' => 'live', 'invisibleContentShown' => false]);
        $rootNode = $this->context->getNode('/');
        $nodeA = $rootNode->createNode('node-a', $nodeType, '30e893c1-caef-0ca5-b53d-e5699bb8e506');
        $nodeB = $rootNode->createNode('node-b', $nodeType, '81c848ed-abb5-7608-a5db-7eea0331ccfa');
        $nodeC = $rootNode->createNode('node-c', $nodeType, 'e3b99700-f632-4a4c-2f93-0ad07eaf733f');
        $nodeA->setProperty('property2', '81c848ed-abb5-7608-a5db-7eea0331ccfa');
        $nodeA->setProperty('property3', ['81c848ed-abb5-7608-a5db-7eea0331ccfa', 'e3b99700-f632-4a4c-2f93-0ad07eaf733f']);
        $nodeB->setHidden(true);
        $this->assertNull($nodeA->getProperty('property2'));
        $property3 = $nodeA->getProperty('property3');
        $this->assertCount(1, $property3);
        $this->assertSame($nodeC, reset($property3));
    }
NodesTest