Skip to content

Commit

Permalink
Merge branch '6.7' into 6.11
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Aug 24, 2017
2 parents 58354b1 + c59c8be commit 44b4a78
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Repository/Tests/URLAliasServiceTest.php
Expand Up @@ -942,4 +942,22 @@ public function testLookUpThrowsNotFoundExceptionWithLanguageFilter()
$loadedAlias = $urlAliasService->lookUp('/Contact-Us', 'ger-DE');
/* END: Use Case */
}

/**
* Test for the lookUp() method.
*
* @see \eZ\Publish\API\Repository\URLAliasService::lookUp($url, $languageCode)
* @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException
*/
public function testLookUpThrowsInvalidArgumentException()
{
$repository = $this->getRepository();

/* BEGIN: Use Case */
$urlAliasService = $repository->getURLAliasService();

// Throws InvalidArgumentException
$loadedAlias = $urlAliasService->lookUp(str_repeat('/1', 99), 'ger-DE');
/* END: Use Case */
}
}
1 change: 1 addition & 0 deletions Repository/URLAliasService.php
Expand Up @@ -100,6 +100,7 @@ public function removeAliases(array $aliasList);
* @param string $languageCode
*
* @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if the path does not exist or is not valid for the given language
* @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException if the path exceeded maximum depth level
*
* @return \eZ\Publish\API\Repository\Values\Content\URLAlias
*/
Expand Down

0 comments on commit 44b4a78

Please sign in to comment.