‪TYPO3CMS  11.5
ScenarioGTest.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 
38 {
39  protected function ‪setUp(): void
40  {
41  parent::setUp();
42 
44  'acme-com',
45  $this->‪buildSiteConfiguration(1000, 'https://acme.com/'),
46  [
47  $this->‪buildDefaultLanguageConfiguration('EN', 'https://acme.com/en'),
48  $this->‪buildLanguageConfiguration('DE', 'https://acme.com/de'),
49  $this->‪buildLanguageConfiguration('DE-CH', 'https://acme.com/de-ch', ['DE', 'EN']),
50  ]
51  );
52 
53  $this->‪setUpDatabaseWithYamlPayload(__DIR__ . '/Fixtures/ScenarioG.yaml');
54  }
55 
59  public function ‪menuDataProvider(): array
60  {
61  return [
62  [
63  'url' => 'https://acme.com/de-ch/willkommen',
64  'menu' => [
65  ['title' => 'DE-CH: Willkommen', 'link' => '/de-ch/willkommen'],
66  ['title' => 'DE: Über uns', 'link' => '/de-ch/ueber-uns'],
67  ['title' => 'DE: Abkürzung zu Über uns', 'link' => '/de-ch/ueber-uns'],
68  ],
69  ],
70  ];
71  }
72 
80  public function ‪pageMenuIsRendered(string $url, array $expectedMenu): void
81  {
82  $this->‪assertMenu($url, $expectedMenu);
83  }
84 }
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\LocalizedPageRendering\ScenarioGTest\pageMenuIsRendered
‪pageMenuIsRendered(string $url, array $expectedMenu)
Definition: ScenarioGTest.php:80
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildLanguageConfiguration
‪array buildLanguageConfiguration(string $identifier, string $base, array $fallbackIdentifiers=[], string $fallbackType=null)
Definition: SiteBasedTestTrait.php:144
‪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\LocalizedPageRendering
Definition: AbstractLocalizedPagesTestCase.php:18
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\LocalizedPageRendering\AbstractLocalizedPagesTestCase
Definition: AbstractLocalizedPagesTestCase.php:28
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\LocalizedPageRendering\ScenarioGTest
Definition: ScenarioGTest.php:38
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildDefaultLanguageConfiguration
‪array buildDefaultLanguageConfiguration(string $identifier, string $base)
Definition: SiteBasedTestTrait.php:126
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\LocalizedPageRendering\AbstractLocalizedPagesTestCase\assertMenu
‪assertMenu(string $url, array $expectation)
Definition: AbstractLocalizedPagesTestCase.php:90
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\LocalizedPageRendering\AbstractLocalizedPagesTestCase\setUpDatabaseWithYamlPayload
‪setUpDatabaseWithYamlPayload(string $pathToYamlFile)
Definition: AbstractLocalizedPagesTestCase.php:35
‪TYPO3\CMS\Core\Tests\Functional\SiteHandling\SiteBasedTestTrait\buildSiteConfiguration
‪array buildSiteConfiguration(int $rootPageId, string $base='')
Definition: SiteBasedTestTrait.php:111
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\LocalizedPageRendering\ScenarioGTest\menuDataProvider
‪array menuDataProvider()
Definition: ScenarioGTest.php:59
‪TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\LocalizedPageRendering\ScenarioGTest\setUp
‪setUp()
Definition: ScenarioGTest.php:39