‪TYPO3CMS  10.4
AbstractXmlSitemapPagesTest.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 
21 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
22 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalResponse;
23 
25 {
29  protected const ‪LANGUAGE_PRESETS = [
30  'EN' => ['id' => 0, 'title' => 'English', 'locale' => 'en_US.UTF8', 'iso' => 'en', 'hrefLang' => 'en-US', 'direction' => ''],
31  'FR' => ['id' => 1, 'title' => 'French', 'locale' => 'fr_FR.UTF8', 'iso' => 'fr', 'hrefLang' => 'fr-FR', 'direction' => ''],
32  'DE' => ['id' => 2, 'title' => 'German', 'locale' => 'de_DE.UTF8', 'iso' => 'de', 'hrefLang' => 'de-DE', 'direction' => ''],
33  ];
34 
38  protected ‪$coreExtensionsToLoad = [
39  'core', 'frontend', 'seo'
40  ];
41 
42  protected function ‪setUp(): void
43  {
44  parent::setUp();
45  $this->importDataSet('EXT:seo/Tests/Functional/Fixtures/pages-sitemap.xml');
46  $this->setUpFrontendRootPage(
47  1,
48  [
49  'constants' => ['EXT:seo/Configuration/TypoScript/XmlSitemap/constants.typoscript'],
50  'setup' => ['EXT:seo/Configuration/TypoScript/XmlSitemap/setup.typoscript']
51  ]
52  );
53 
55  'website-local',
56  $this->‪buildSiteConfiguration(1, 'http://localhost/'),
57  [
58  $this->‪buildDefaultLanguageConfiguration('EN', '/'),
59  $this->‪buildLanguageConfiguration('FR', '/fr/'),
60  $this->‪buildLanguageConfiguration('DE', '/de/', ['FR'])
61  ]
62  );
63  }
64 
65  protected function ‪getResponse(string $uri = 'http://localhost/'): InternalResponse
66  {
67  return $this->executeFrontendRequest(
68  (new InternalRequest($uri))->withQueryParameters([
69  'id' => 1,
70  'type' => 1533906435,
71  'sitemap' => 'pages'
72  ])
73  );
74  }
75 }
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTest\getResponse
‪getResponse(string $uri='http://localhost/')
Definition: AbstractXmlSitemapPagesTest.php:64
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTest\setUp
‪setUp()
Definition: AbstractXmlSitemapPagesTest.php:41
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildLanguageConfiguration
‪array buildLanguageConfiguration(string $identifier, string $base, array $fallbackIdentifiers=[], string $fallbackType=null)
Definition: SiteBasedTestTrait.php:142
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\writeSiteConfiguration
‪writeSiteConfiguration(string $identifier, array $site=[], array $languages=[], array $errorHandling=[])
Definition: SiteBasedTestTrait.php:58
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\AbstractTestCase
Definition: AbstractTestCase.php:29
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap
Definition: AbstractXmlSitemapPagesTest.php:18
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildDefaultLanguageConfiguration
‪array buildDefaultLanguageConfiguration(string $identifier, string $base)
Definition: SiteBasedTestTrait.php:124
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTest\LANGUAGE_PRESETS
‪const LANGUAGE_PRESETS
Definition: AbstractXmlSitemapPagesTest.php:29
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildSiteConfiguration
‪array buildSiteConfiguration(int $rootPageId, string $base='')
Definition: SiteBasedTestTrait.php:109
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTest
Definition: AbstractXmlSitemapPagesTest.php:25
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTest\$coreExtensionsToLoad
‪string[] $coreExtensionsToLoad
Definition: AbstractXmlSitemapPagesTest.php:37