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