mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-29 00:56:12 +01:00

[TASK] Enable tests in t3 v10 (#77)

Co-authored-by: Łukasz Uznański <l.uznanski@macopedia.pl>
This commit is contained in:
Łukasz Uznański 2020-07-23 12:41:27 +02:00 committed by GitHub
parent ea4456ee97
commit 46e598e7e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

@ -134,6 +134,7 @@ jobs:
- 7.4
typo3-version:
- ^9.5
- ^10.4
functional-tests:
name: "Functional tests"
runs-on: ubuntu-latest
@ -195,3 +196,4 @@ jobs:
- 7.4
typo3-version:
- ^9.5
- ^10.4

View file

@ -5,6 +5,7 @@ declare(strict_types=1);
namespace TTN\Tea\Tests\Functional\Controller;
use Nimut\TestingFramework\TestCase\FunctionalTestCase;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
/**
* Test case.
@ -33,7 +34,8 @@ class TeaControllerTest extends FunctionalTestCase
$this->setUpFrontendRootPage(
1,
[
'EXT:fluid_styled_content/Configuration/TypoScript/setup.txt',
'EXT:fluid_styled_content/Configuration/TypoScript/setup.'
. ($this->isTYPO3VersionAbove10() ? 'typoscript' : 'txt'),
'EXT:tea/Configuration/TypoScript/setup.typoscript',
'EXT:tea/Tests/Functional/Controller/Fixtures/Frontend/Basic.typoscript',
]
@ -50,4 +52,12 @@ class TeaControllerTest extends FunctionalTestCase
$teaTitle = 'Earl Grey';
self::assertContains($teaTitle, $responseContent);
}
/**
* @return bool
*/
protected function isTYPO3VersionAbove10(): bool
{
return VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 10000000;
}
}