示例#1
0
 /**
  * @return void
  */
 public function testTouchUrlActive()
 {
     $locale = $this->localeFacade->createLocale('ABCDE');
     $redirect = $this->urlFacade->createRedirect('/ARedirectUrl');
     $idUrl = $this->urlFacade->createUrl('/aPageUrl', $locale, 'redirect', $redirect->getIdUrlRedirect())->getIdUrl();
     $touchQuery = $this->touchQueryContainer->queryTouchEntry('url', $idUrl);
     $touchQuery->setQueryKey('count');
     $this->assertEquals(0, $touchQuery->count());
     $touchQuery->setQueryKey(TouchQueryContainer::TOUCH_ENTRY_QUERY_KEY);
     $this->urlFacade->touchUrlActive($idUrl);
     $touchQuery->setQueryKey('count');
     $this->assertEquals(1, $touchQuery->count());
 }
 /**
  * @param string $url
  * @param \Generated\Shared\Transfer\LocaleTransfer $locale
  * @param string $resourceType
  * @param int $idResource
  *
  * @throws \Propel\Runtime\Exception\PropelException
  * @throws \Spryker\Zed\Url\Business\Exception\UrlExistsException
  *
  * @return \Generated\Shared\Transfer\UrlTransfer
  */
 public function createUrl($url, LocaleTransfer $locale, $resourceType, $idResource)
 {
     return $this->urlFacade->createUrl($url, $locale, $resourceType, $idResource);
 }