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

testCreateUrlAliasThrowsInvalidArgumentException() public method

Test for the createUrlAlias() method.
    public function testCreateUrlAliasThrowsInvalidArgumentException()
    {
        $location = $this->getLocationStub();
        $urlAliasService = $this->getRepository()->getURLAliasService();
        $urlAliasHandler = $this->getPersistenceMockHandler('Content\\UrlAlias\\Handler');
        $urlAliasHandler->expects($this->once())->method('createCustomUrlAlias')->with($this->equalTo($location->id), $this->equalTo('path'), $this->equalTo('forwarding'), $this->equalTo('languageCode'), $this->equalTo('alwaysAvailable'))->will($this->throwException(new ForbiddenException('Forbidden!')));
        $urlAliasService->createUrlAlias($location, 'path', 'languageCode', 'forwarding', 'alwaysAvailable');
    }
UrlAliasTest