Exemplo n.º 1
0
 private function createUrlInformation()
 {
     $resultList = array();
     $urlInformation = new UrlInformation();
     $urlInformation->setLocation('http://www.test-alternate-locale.de')->setChangeFrequency('never')->setLabel('Test alternate locale')->setPriority(0.85)->setLastModification(new \DateTime('2014-11-07', new \DateTimeZone('Europe/Berlin')));
     $alternateLocale = new AlternateLocale('http://www.test-alternate-locale.com', 'en');
     $urlInformation->addAlternateLocale($alternateLocale);
     $resultList[] = $urlInformation;
     $urlInformation = new UrlInformation();
     $urlInformation->setLocation('http://www.test-domain.de')->setChangeFrequency('always')->setLabel('Test label')->setPriority(0.85)->setLastModification(new \DateTime('2014-11-06', new \DateTimeZone('Europe/Berlin')));
     $resultList[] = $urlInformation;
     return $resultList;
 }
 private function createRoutes()
 {
     $urls = array();
     $simpleUrl = new UrlInformation();
     $simpleUrl->setLocation('http://www.test-domain.de')->setChangeFrequency('always')->setLabel('Test label')->setPriority(0.85)->setLastModification(new \DateTime('2014-11-06', new \DateTimeZone('Europe/Berlin')));
     $urlWithAlternateLocale = new UrlInformation();
     $urlWithAlternateLocale->setLocation('http://www.test-alternate-locale.de')->setChangeFrequency('never')->setLabel('Test alternate locale')->setPriority(0.85)->setLastModification(new \DateTime('2014-11-07', new \DateTimeZone('Europe/Berlin')));
     $alternateLocale = new AlternateLocale('http://www.test-alternate-locale.com', 'en');
     $urlWithAlternateLocale->addAlternateLocale($alternateLocale);
     $urls[] = $urlWithAlternateLocale;
     $urls[] = $simpleUrl;
     $this->provider->expects($this->any())->method('getUrlInformation')->will($this->returnValue($urls));
 }