‪TYPO3CMS  ‪main
AbstractXmlSitemapPagesTestCase.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 
20 use Psr\Http\Message\ResponseInterface;
22 use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
23 
25 {
29  protected const ‪LANGUAGE_PRESETS = [
30  'EN' => ['id' => 0, 'title' => 'English', 'locale' => 'en_US.UTF8'],
31  'FR' => ['id' => 1, 'title' => 'French', 'locale' => 'fr_FR.UTF8'],
32  'DE' => ['id' => 2, 'title' => 'German', 'locale' => 'de_DE.UTF8'],
33  ];
34 
35  protected array ‪$coreExtensionsToLoad = ['seo'];
36 
37  protected function ‪setUp(): void
38  {
39  parent::setUp();
40  $this->importCSVDataSet(__DIR__ . '/../Fixtures/pages-sitemap.csv');
41  $this->setUpFrontendRootPage(
42  1,
43  [
44  'constants' => ['EXT:seo/Configuration/TypoScript/XmlSitemap/constants.typoscript'],
45  'setup' => ['EXT:seo/Configuration/TypoScript/XmlSitemap/setup.typoscript'],
46  ]
47  );
48 
50  'website-local',
51  $this->‪buildSiteConfiguration(1, 'http://localhost/'),
52  [
53  $this->‪buildDefaultLanguageConfiguration('EN', '/'),
54  $this->‪buildLanguageConfiguration('FR', '/fr/'),
55  $this->‪buildLanguageConfiguration('DE', '/de/', ['FR']),
56  ]
57  );
58  }
59 
60  protected function ‪getResponse(string $uri = 'http://localhost/'): ResponseInterface
61  {
62  return $this->executeFrontendSubRequest(
63  (new InternalRequest($uri))->withQueryParameters([
64  'id' => 1,
65  'type' => 1533906435,
66  'sitemap' => 'pages',
67  ])
68  );
69  }
70 }
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildLanguageConfiguration
‪buildLanguageConfiguration(string $identifier, string $base, array $fallbackIdentifiers=[], string $fallbackType=null)
Definition: SiteBasedTestTrait.php:108
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTestCase\getResponse
‪getResponse(string $uri='http://localhost/')
Definition: AbstractXmlSitemapPagesTestCase.php:60
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTestCase
Definition: AbstractXmlSitemapPagesTestCase.php:25
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\writeSiteConfiguration
‪writeSiteConfiguration(string $identifier, array $site=[], array $languages=[], array $errorHandling=[])
Definition: SiteBasedTestTrait.php:50
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTestCase\$coreExtensionsToLoad
‪array $coreExtensionsToLoad
Definition: AbstractXmlSitemapPagesTestCase.php:35
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\AbstractTestCase
Definition: AbstractTestCase.php:29
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildSiteConfiguration
‪buildSiteConfiguration(int $rootPageId, string $base='')
Definition: SiteBasedTestTrait.php:88
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap
Definition: AbstractXmlSitemapPagesTestCase.php:18
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTestCase\LANGUAGE_PRESETS
‪const LANGUAGE_PRESETS
Definition: AbstractXmlSitemapPagesTestCase.php:29
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildDefaultLanguageConfiguration
‪buildDefaultLanguageConfiguration(string $identifier, string $base)
Definition: SiteBasedTestTrait.php:98
‪TYPO3\CMS\Seo\Tests\Functional\XmlSitemap\AbstractXmlSitemapPagesTestCase\setUp
‪setUp()
Definition: AbstractXmlSitemapPagesTestCase.php:37