@@ 30-47 (lines=18) @@ | ||
27 | parent::setUp(); |
|
28 | } |
|
29 | ||
30 | public function testAssertSitemapCount(): void |
|
31 | { |
|
32 | $this->expectException(AssertionFailedError::class); |
|
33 | $this->expectExceptionMessage('Failed asserting that actual size 2 matches expected size 1.'); |
|
34 | ||
35 | $sitemap = $this->prophesize(SitemapDefinitionInterface::class); |
|
36 | ||
37 | $this->serviceMock->execute($sitemap) |
|
38 | ->willReturn([ |
|
39 | new Url('/path/foo', 20, Url::FREQUENCE_DAILY), |
|
40 | new Url('/path/bar', 20, Url::FREQUENCE_DAILY), |
|
41 | ]) |
|
42 | ; |
|
43 | ||
44 | $this->assertSitemap('/path/bar', 20, Url::FREQUENCE_DAILY); |
|
45 | ||
46 | $this->process($sitemap->reveal()); |
|
47 | } |
|
48 | ||
49 | public function testAssertUrlNotCalled(): void |
|
50 | { |
|
@@ 69-85 (lines=17) @@ | ||
66 | $this->process($sitemap->reveal()); |
|
67 | } |
|
68 | ||
69 | public function testAssertLastmod(): void |
|
70 | { |
|
71 | $this->expectException(AssertionFailedError::class); |
|
72 | $this->expectExceptionMessage("The url '/path/foo' was expected with a different lastmod."); |
|
73 | ||
74 | $sitemap = $this->prophesize(SitemapDefinitionInterface::class); |
|
75 | ||
76 | $this->serviceMock->execute($sitemap) |
|
77 | ->willReturn([ |
|
78 | new Url('/path/foo', 20, Url::FREQUENCE_DAILY, new DateTime('2018-10-02')), |
|
79 | ]) |
|
80 | ; |
|
81 | ||
82 | $this->assertSitemap('/path/foo', 20, Url::FREQUENCE_DAILY, new DateTime('2018-10-01')); |
|
83 | ||
84 | $this->process($sitemap->reveal()); |
|
85 | } |
|
86 | ||
87 | public function testAssertPriority(): void |
|
88 | { |