2 declare(strict_types = 1);
33 $this->assertEquals(200, $response->getStatusCode());
34 $this->assertArrayHasKey(
'Content-Length', $response->getHeaders());
35 $this->assertGreaterThan(0, $response->getHeader(
'Content-Length')[0]);
36 $this->assertArrayHasKey(
'Content-Type', $response->getHeaders());
37 $this->assertEquals(
'application/xml;charset=utf-8', $response->getHeader(
'Content-Type')[0]);
38 $this->assertArrayHasKey(
'X-Robots-Tag', $response->getHeaders());
39 $this->assertEquals(
'noindex', $response->getHeader(
'X-Robots-Tag')[0]);
41 $this->assertRegExp($urlPattern, (
string)$response->getBody());
49 self::assertStringNotContainsString(
50 '<loc>http://localhost/canonicalized-page</loc>',
60 self::assertStringNotContainsString(
61 '<loc>http://localhost/no-index</loc>',
73 self::assertStringNotContainsString(
74 '<loc>http://localhost/hidden-in-default</loc>',
86 self::assertStringNotContainsString(
87 '<loc>http://localhost/de/dummy-1-2-5-fr</loc>',
88 (
string)$this->
getResponse(
'http://localhost/de/')->getBody()
99 'complete-entry' => [
'#<url>\s+<loc>http://localhost/complete\-entry</loc>\s+<lastmod>\d+-\d+-\d+T\d+:\d+:\d+\+\d+:\d+</lastmod>\s+</url>#'],
110 (
new \SimpleXMLElement((
string)$this->
getResponse(
'http://localhost/fr/')->getBody()))->count()
119 $this->assertStringNotContainsString(
120 '<loc>http://localhost/dummy-1-4</loc>',
121 (
string)$this->
getResponse(
'http://localhost/fr/')->getBody()
130 self::assertStringContainsString(
131 '<loc>http://localhost/de/dummy-1-3-fr</loc>',
132 (
string)$this->
getResponse(
'http://localhost/de/')->getBody()