-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] siteLanguage with fallbackType free
- Loading branch information
Achim Fritz
committed
Jun 8, 2023
1 parent
0e84d13
commit 8448439
Showing
4 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
Tests/Functional/Frontend/Fixtures/SiteLanguageFree/setup.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"pages" | ||
,"uid","pid","title","slug","sys_language_uid","l10n_parent","l10n_source" | ||
,1,0,"page-1","/",0,0,0 | ||
,2,0,"page-1-language-4","/",4,1,1 | ||
"tt_content" | ||
,"uid","pid","CType","header","sys_language_uid","colPos","tx_container_parent","l18n_parent","l10n_source" | ||
,1,1,"b13-2cols-with-header-container","container-default",0,0,0,0,0 | ||
,2,1,"header","header-default",0,200,1,0,0 | ||
,3,1,"b13-2cols-with-header-container","container-translated",4,0,0,1,1 | ||
,4,1,"header","header-translated",4,200,1,2,2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace B13\Container\Tests\Functional\Frontend; | ||
|
||
/* | ||
* This file is part of TYPO3 CMS-based extension "container" by b13. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
*/ | ||
|
||
use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest; | ||
|
||
class SiteLanguageFreeTest extends AbstractFrontendTest | ||
{ | ||
protected function setUp(): void | ||
{ | ||
parent::setUp(); | ||
$this->importCSVDataSet(__DIR__ . '/Fixtures/SiteLanguageFree/setup.csv'); | ||
$this->setUpFrontendRootPage( | ||
1, | ||
[ | ||
'constants' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/constants.typoscript'], | ||
'setup' => ['EXT:container/Tests/Functional/Frontend/Fixtures/TypoScript/setup.typoscript'], | ||
] | ||
); | ||
} | ||
|
||
/** | ||
* @test | ||
* @group frontend | ||
*/ | ||
public function containerTranslatedInFreeModeSiteConfiguration(): void | ||
{ | ||
$response = $this->executeFrontendRequestWrapper(new InternalRequest('http://localhost/en-free')); | ||
$body = (string)$response->getBody(); | ||
$body = $this->prepareContent($body); | ||
self::assertStringNotContainsString('<h2 class="">header-default</h2>', $body); | ||
self::assertStringContainsString('<h2 class="">header-translated</h2>', $body); | ||
} | ||
} |