‪TYPO3CMS  10.4
XmlSitemapPagesWithHideIfNotTranslatedTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
25 {
34  'FE' => [
35  'hidePagesIfNotTranslatedByDefault' => true,
36  'cacheHash' => [
37  'enforceValidation' => false,
38  ],
39  ],
40  ];
41 
50  {
51  self::assertStringContainsString(
52  '<loc>http://localhost/de/dummy-1-2-5-fr</loc>',
53  (string)$this->‪getResponse('http://localhost/de/')->getBody()
54  );
55  }
56 
62  public function ‪pagesSitemapContainsTranslatedPages(): void
63  {
64  self::assertEquals(
65  4,
66  (new \SimpleXMLElement((string)$this->‪getResponse('http://localhost/fr/')->getBody()))->count()
67  );
68  }
69 
76  {
77  self::assertStringNotContainsString(
78  '<loc>http://localhost/dummy-1-4</loc>',
79  (string)$this->‪getResponse('http://localhost/fr/')->getBody()
80  );
81  }
82 
90  {
91  self::assertStringNotContainsString(
92  '<loc>http://localhost/de/dummy-1-3-fr</loc>',
93  (string)$this->‪getResponse('http://localhost/de/')->getBody()
94  );
95  }
96 }
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTest\getResponse
‪getResponse(string $uri='http://localhost/')
Definition: AbstractXmlSitemapPagesTest.php:64
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest\pagesSitemapContainsTranslatedPages
‪pagesSitemapContainsTranslatedPages()
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:61
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:25
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest\pagesSitemapDoesNotContainUntranslatedPages
‪pagesSitemapDoesNotContainUntranslatedPages()
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:74
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap
Definition: AbstractXmlSitemapPagesTest.php:18
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest\$configurationToUseInTestInstance
‪array $configurationToUseInTestInstance
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:32
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest\pagesSitemapDoesNotCareAboutFallbackStrategy
‪pagesSitemapDoesNotCareAboutFallbackStrategy()
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:88
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\XmlSitemapPagesWithHideIfNotTranslatedTest\pagesSitemapInAlternativeLanguageDoesContainSiteThatIsHiddenIfNotTranslated
‪pagesSitemapInAlternativeLanguageDoesContainSiteThatIsHiddenIfNotTranslated()
Definition: XmlSitemapPagesWithHideIfNotTranslatedTest.php:48
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTest
Definition: AbstractXmlSitemapPagesTest.php:25