eZ\Publish\Core\MVC\Symfony\Controller\Tests\Controller\Content\PreviewControllerTest::testPreviewUnauthorized PHP Метод

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

    public function testPreviewUnauthorized()
    {
        $controller = $this->getPreviewController();
        $contentId = 123;
        $lang = 'eng-GB';
        $versionNo = 3;
        $this->contentService->expects($this->once())->method('loadContent')->with($contentId, array($lang), $versionNo)->will($this->throwException(new UnauthorizedException('foo', 'bar')));
        $controller->previewContentAction(new Request(), $contentId, $versionNo, $lang, 'test');
    }