mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-23 15:16:12 +01:00

Compare commits

...

5 commits

Author SHA1 Message Date
Eike Starkmann
d27d785417
Merge 951aaf0751 into de096dac50 2024-11-12 21:22:44 +01:00
dependabot[bot]
de096dac50
[TASK][Dependabot] Update phpstan/phpstan requirement (#1511)
Updates the requirements on [phpstan/phpstan](https://github.com/phpstan/phpstan) to permit the latest version.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/2.0.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.12.8...1.12.9)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-10 18:13:18 +00:00
Eike Starkmann
951aaf0751 [BUGFIX] Fix code style
Related: #1228
2024-07-31 19:55:03 +02:00
Eike Starkmann
8ac92402eb [BUGFIX] Use single quotes
Related: #1228
2024-07-31 19:39:14 +02:00
Eike Starkmann
d7dd9465a3 [TASK] Add for showAction
Related: #1228
2024-07-31 19:39:14 +02:00
4 changed files with 31 additions and 4 deletions

View file

@ -1,3 +1,4 @@
"tt_content" "tt_content"
,"uid","pid","CType","header","list_type" ,"uid","pid","CType","header","list_type"
,1,1,"list","Teas Index","tea_teaindex" ,1,1,"list","Teas Index","tea_teaindex"
,2,3,"list","Tea Show","tea_teashow"

Can't render this file because it has a wrong number of fields in line 2.

View file

@ -2,3 +2,4 @@
,"uid","pid","title","slug" ,"uid","pid","title","slug"
,1,0,"Rootpage","/" ,1,0,"Rootpage","/"
,2,1,"Storage","/storage" ,2,1,"Storage","/storage"
,3,1,"Show","/show"

Can't render this file because it has a wrong number of fields in line 2.

View file

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace TTN\Tea\Tests\Functional\Controller; namespace TTN\Tea\Tests\Functional\Controller;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest; use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\InternalRequest;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
@ -22,6 +23,14 @@ final class TeaControllerTest extends FunctionalTestCase
protected function setUp(): void protected function setUp(): void
{ {
ArrayUtility::mergeRecursiveWithOverrule($this->configurationToUseInTestInstance, [
'FE' => [
'cacheHash' => [
'enforceValidation' => false,
],
],
]);
parent::setUp(); parent::setUp();
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/SiteStructure.csv'); $this->importCSVDataSet(__DIR__ . '/Fixtures/Database/SiteStructure.csv');
@ -37,6 +46,8 @@ final class TeaControllerTest extends FunctionalTestCase
'EXT:tea/Tests/Functional/Controller/Fixtures/TypoScript/Setup/Rendering.typoscript', 'EXT:tea/Tests/Functional/Controller/Fixtures/TypoScript/Setup/Rendering.typoscript',
], ],
]); ]);
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/ContentElementTeaIndex.csv');
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/Teas.csv');
} }
/** /**
@ -44,9 +55,6 @@ final class TeaControllerTest extends FunctionalTestCase
*/ */
public function indexActionRendersAllAvailableTeas(): void public function indexActionRendersAllAvailableTeas(): void
{ {
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/ContentElementTeaIndex.csv');
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/Teas.csv');
$request = new InternalRequest(); $request = new InternalRequest();
$request = $request->withPageId(1); $request = $request->withPageId(1);
@ -55,4 +63,21 @@ final class TeaControllerTest extends FunctionalTestCase
self::assertStringContainsString('Godesberger Burgtee', $html); self::assertStringContainsString('Godesberger Burgtee', $html);
self::assertStringContainsString('Oolong', $html); self::assertStringContainsString('Oolong', $html);
} }
/**
* @test
*/
public function showActionRendersTheGivenTeas(): void
{
$request = new InternalRequest();
$request = $request->withPageId(3);
$request = $request->withQueryParameters([
'tx_tea_teashow[tea]' => 1,
]);
$html = (string)$this->executeFrontendSubRequest($request)->getBody();
self::assertStringContainsString('Godesberger Burgtee', $html);
self::assertStringNotContainsString('Oolong', $html);
}
} }

View file

@ -54,7 +54,7 @@
"php-parallel-lint/php-parallel-lint": "1.4.0", "php-parallel-lint/php-parallel-lint": "1.4.0",
"phpmd/phpmd": "2.15.0", "phpmd/phpmd": "2.15.0",
"phpstan/extension-installer": "1.4.3", "phpstan/extension-installer": "1.4.3",
"phpstan/phpstan": "1.12.8", "phpstan/phpstan": "1.12.9",
"phpstan/phpstan-phpunit": "1.4.0", "phpstan/phpstan-phpunit": "1.4.0",
"phpstan/phpstan-strict-rules": "1.6.1", "phpstan/phpstan-strict-rules": "1.6.1",
"phpunit/phpunit": "9.6.20", "phpunit/phpunit": "9.6.20",