mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2025-02-09 22:03:50 +01:00
Compare commits
7 commits
0c5adff00c
...
1725b0361c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1725b0361c | ||
![]() |
87742e2d0d | ||
![]() |
e0ceb64bb2 | ||
![]() |
20a7966e65 | ||
![]() |
b83f017ad9 | ||
![]() |
435bff059e | ||
![]() |
45f9479e58 |
5 changed files with 29 additions and 5 deletions
|
@ -558,7 +558,7 @@ case ${TEST_SUITE} in
|
|||
;;
|
||||
functional)
|
||||
[ -z "${TEST_FILE}" ] && TEST_FILE="Tests/Functional"
|
||||
COMMAND=".Build/bin/phpunit -c Build/phpunit/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}"
|
||||
COMMAND=".Build/bin/paratest -c Build/phpunit/FunctionalTests.xml --exclude-group not-${DBMS} ${EXTRA_TEST_OPTIONS} ${TEST_FILE}"
|
||||
case ${DBMS} in
|
||||
mariadb)
|
||||
echo "Using driver: ${DATABASE_DRIVER}"
|
||||
|
@ -586,6 +586,7 @@ case ${TEST_SUITE} in
|
|||
sqlite)
|
||||
CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite"
|
||||
${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND}
|
||||
echo "{CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG=\"${XDEBUG_CONFIG}\" ${CONTAINERPARAMS} ${IMAGE_PHP} ${COMMAND}"
|
||||
SUITE_EXIT_CODE=$?
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
"tt_content"
|
||||
,"uid","pid","CType","header","list_type"
|
||||
,1,1,"list","Tea 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.
|
|
@ -2,3 +2,4 @@
|
|||
,"uid","pid","title","slug"
|
||||
,1,0,"Rootpage","/"
|
||||
,2,1,"Storage","/storage"
|
||||
,3,1,"Show","/show"
|
||||
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -20,6 +20,14 @@ final class TeaControllerTest extends FunctionalTestCase
|
|||
'typo3conf/ext/tea/Tests/Functional/Controller/Fixtures/Sites/' => 'typo3conf/sites',
|
||||
];
|
||||
|
||||
protected array $configurationToUseInTestInstance = [
|
||||
'FE' => [
|
||||
'cacheHash' => [
|
||||
'enforceValidation' => false,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
@ -37,6 +45,8 @@ final class TeaControllerTest extends FunctionalTestCase
|
|||
'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 +54,6 @@ final class TeaControllerTest extends FunctionalTestCase
|
|||
*/
|
||||
public function indexActionRendersAllAvailableTeas(): void
|
||||
{
|
||||
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/ContentElementTeaIndex.csv');
|
||||
$this->importCSVDataSet(__DIR__ . '/Fixtures/Database/Teas.csv');
|
||||
|
||||
$request = (new InternalRequest())->withPageId(1);
|
||||
|
||||
$html = (string)$this->executeFrontendSubRequest($request)->getBody();
|
||||
|
@ -54,4 +61,17 @@ final class TeaControllerTest extends FunctionalTestCase
|
|||
self::assertStringContainsString('Godesberger Burgtee', $html);
|
||||
self::assertStringContainsString('Oolong', $html);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function showActionRendersTheGivenTeas(): void
|
||||
{
|
||||
$request = (new InternalRequest())->withPageId(3)->withQueryParameters(['tx_tea_teashow[tea]' => 1]);
|
||||
|
||||
$html = (string)$this->executeFrontendSubRequest($request)->getBody();
|
||||
|
||||
self::assertStringContainsString('Godesberger Burgtee', $html);
|
||||
self::assertStringNotContainsString('Oolong', $html);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
"typo3/cms-frontend": "^11.5.41 || ^12.4.24"
|
||||
},
|
||||
"require-dev": {
|
||||
"brianium/paratest": "6.11.1",
|
||||
"ergebnis/composer-normalize": "2.45.0",
|
||||
"friendsofphp/php-cs-fixer": "3.66.0",
|
||||
"helmich/typo3-typoscript-lint": "3.1.1 || 3.2.1",
|
||||
|
@ -166,7 +167,7 @@
|
|||
"ci:tests:create-directories": "mkdir -p .Build/public/typo3temp/var/tests",
|
||||
"ci:tests:functional": [
|
||||
"@ci:tests:create-directories",
|
||||
"find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \\\"Running functional test suite {}\\\"; .Build/bin/phpunit -c Build/phpunit/FunctionalTests.xml {}';"
|
||||
"paratest -c Build/phpunit/FunctionalTests.xml Tests/Functional"
|
||||
],
|
||||
"ci:tests:unit": "phpunit -c Build/phpunit/UnitTests.xml Tests/Unit",
|
||||
"ci:typoscript:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
|
||||
|
|
Loading…
Add table
Reference in a new issue