eZ\Publish\Core\Repository\Tests\Service\Mock\UrlAliasTest::testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionPath PHP Method

testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionPath() public method

Test for the createGlobalUrlAlias() method.
    public function testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionPath()
    {
        $resource = 'module:content/search';
        $urlAliasService = $this->getRepository()->getURLAliasService();
        $urlAliasHandler = $this->getPersistenceMockHandler('Content\\UrlAlias\\Handler');
        $urlAliasHandler->expects($this->once())->method('createGlobalUrlAlias')->with($this->equalTo($resource), $this->equalTo('path'), $this->equalTo('forwarding'), $this->equalTo('languageCode'), $this->equalTo('alwaysAvailable'))->will($this->throwException(new ForbiddenException('Forbidden!')));
        $urlAliasService->createGlobalUrlAlias($resource, 'path', 'languageCode', 'forwarding', 'alwaysAvailable');
    }
UrlAliasTest