‪TYPO3CMS  9.5
XmlSitemapPagesWithHideIfNotTranslatedTest.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
3 
5 
6 /*
7  * This file is part of the TYPO3 CMS project.
8  *
9  * It is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License, either version 2
11  * of the License, or any later version.
12  *
13  * For the full copyright and license information, please read the
14  * LICENSE.txt file that was distributed with this source code.
15  *
16  * The TYPO3 project - inspiring people to share!
17  */
18 
24 {
33  'FE' => [
34  'hidePagesIfNotTranslatedByDefault' => true
35  ]
36  ];
37 
46  {
47  self::assertStringContainsString(
48  '<loc>http://localhost/de/dummy-1-2-5-fr</loc>',
49  (string)$this->‪getResponse('http://localhost/de/')->getBody()
50  );
51  }
52 
58  public function ‪pagesSitemapContainsTranslatedPages(): void
59  {
60  self::assertEquals(
61  4,
62  (new \SimpleXMLElement((string)$this->‪getResponse('http://localhost/fr/')->getBody()))->count()
63  );
64  }
65 
72  {
73  self::assertStringNotContainsString(
74  '<loc>http://localhost/dummy-1-4</loc>',
75  (string)$this->‪getResponse('http://localhost/fr/')->getBody()
76  );
77  }
78 
86  {
87  self::assertStringNotContainsString(
88  '<loc>http://localhost/de/dummy-1-3-fr</loc>',
89  (string)$this->‪getResponse('http://localhost/de/')->getBody()
90  );
91  }
92 }
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTest\getResponse
‪getResponse(string $uri='http://localhost/')
Definition: AbstractXmlSitemapPagesTest.php:63
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest\pagesSitemapContainsTranslatedPages
‪pagesSitemapContainsTranslatedPages()
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:57
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:24
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest\pagesSitemapDoesNotContainUntranslatedPages
‪pagesSitemapDoesNotContainUntranslatedPages()
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:70
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap
Definition: AbstractXmlSitemapPagesTest.php:4
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest\$configurationToUseInTestInstance
‪array $configurationToUseInTestInstance
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:31
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest\pagesSitemapDoesNotCareAboutFallbackStrategy
‪pagesSitemapDoesNotCareAboutFallbackStrategy()
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:84
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest\pagesSitemapInAlternativeLanguageDoesContainSiteThatIsHiddenIfNotTranslated
‪pagesSitemapInAlternativeLanguageDoesContainSiteThatIsHiddenIfNotTranslated()
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:44
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTest
Definition: AbstractXmlSitemapPagesTest.php:24