eZ\Publish\Core\Repository\Tests\Service\Mock\ContentTest::testLoadContentUnauthorized PHP Method

testLoadContentUnauthorized() public method

    public function testLoadContentUnauthorized()
    {
        $repository = $this->getRepositoryMock();
        $contentService = $this->getPartlyMockedContentService(array('internalLoadContent'));
        $content = $this->getMock('eZ\\Publish\\API\\Repository\\Values\\Content\\Content');
        $contentId = 123;
        $contentService->expects($this->once())->method('internalLoadContent')->with($contentId)->will($this->returnValue($content));
        $repository->expects($this->once())->method('canUser')->with('content', 'read', $content)->will($this->returnValue(false));
        $contentService->loadContent($contentId);
    }
ContentTest