Neos\ContentRepository\Tests\Unit\FlowQueryOperations\ContextOperationTest::buildFlowQueryWithNodeInContext PHP Method

buildFlowQueryWithNodeInContext() protected method

protected buildFlowQueryWithNodeInContext ( Neos\ContentRepository\Domain\Model\NodeInterface $mockNode, array $nodeContextProperties ) : FlowQuery
$mockNode Neos\ContentRepository\Domain\Model\NodeInterface
$nodeContextProperties array
return Neos\Eel\FlowQuery\FlowQuery
    protected function buildFlowQueryWithNodeInContext($mockNode, $nodeContextProperties)
    {
        $mockNodeContext = $this->getMockBuilder(Context::class)->disableOriginalConstructor()->getMock();
        $mockNodeContext->expects($this->any())->method('getProperties')->will($this->returnValue($nodeContextProperties));
        $mockNode->expects($this->any())->method('getContext')->will($this->returnValue($mockNodeContext));
        $mockFlowQuery = $this->getMockBuilder(FlowQuery::class)->disableOriginalConstructor()->getMock();
        $mockFlowQuery->expects($this->any())->method('getContext')->will($this->returnValue(array($mockNode)));
        return $mockFlowQuery;
    }