Esempio n. 1
0
 /**
  * Returns the number of tags by specified keyword.
  *
  * @param string $keyword The keyword to fetch tags count for
  * @param string $language The language to check for
  * @param bool $useAlwaysAvailable Check for main language if true (default) and if tag is always available
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException If the current user is not allowed to read tags
  *
  * @return int
  */
 public function getTagsByKeywordCount($keyword, $language, $useAlwaysAvailable = true)
 {
     return $this->service->getTagsByKeywordCount($keyword, $language, $useAlwaysAvailable);
 }
Esempio n. 2
0
 /**
  * @expectedException \eZ\Publish\API\Repository\Exceptions\UnauthorizedException
  *
  * @covers \Netgen\TagsBundle\Core\Repository\TagsService::getTagsByKeywordCount
  */
 public function testGetTagsByKeywordCountThrowsUnauthorizedException()
 {
     $this->repository->setCurrentUser($this->getStubbedUser(10));
     $this->tagsService->getTagsByKeywordCount('eztags', 'eng-GB');
 }