function it_creates_empty_sitemap_url(SitemapUrlInterface $sitemapUrl)
 {
     $sitemapUrl->getLastModification()->willReturn(null);
     $sitemapUrl->getLocalization()->willReturn(null);
     $sitemapUrl->getPriority()->willReturn(null);
     $sitemapUrl->getChangeFrequency()->willReturn('');
     $this->createNew()->shouldBeSameAs($sitemapUrl);
 }
Exemple #2
0
 function it_throws_sitemap_url_not_found_exception_if_cannot_find_url_to_remove(SitemapUrlInterface $productUrl, SitemapUrlInterface $staticUrl)
 {
     $this->addUrl($productUrl);
     $staticUrl->getLocalization()->willReturn('http://sylius.org');
     $this->shouldThrow(SitemapUrlNotFoundException::class)->during('removeUrl', [$staticUrl]);
 }
 function let(SitemapUrlInterface $sitemapUrl)
 {
     $sitemapUrl->getLocalization()->willReturn('http://sylius.org');
     $this->beConstructedWith($sitemapUrl, null);
 }
 /**
  * {@inheritdoc}
  */
 public function __construct(SitemapUrlInterface $sitemapUrl, \Exception $previousException = null)
 {
     parent::__construct(sprintf('Sitemap url %s not found', $sitemapUrl->getLocalization()), 0, $previousException);
 }