diff --git a/Tests/Unit/Configuration/ExtensionConfigurationTest.php b/Tests/Unit/Configuration/ExtensionConfigurationTest.php index b58f098..7d0f5b2 100644 --- a/Tests/Unit/Configuration/ExtensionConfigurationTest.php +++ b/Tests/Unit/Configuration/ExtensionConfigurationTest.php @@ -44,6 +44,8 @@ class ExtensionConfigurationTest extends BaseTestCase */ protected function setUp(): void { + parent::setUp(); + $mockedExtConfig = [ 'refreshCache' => '0', 'productionContext' => '1', diff --git a/Tests/phpunit.xml b/Tests/phpunit.xml index ea3341e..d0e1914 100644 --- a/Tests/phpunit.xml +++ b/Tests/phpunit.xml @@ -1,31 +1,30 @@ - + + ./ - - - ../Classes - - - \ No newline at end of file + + + ../Classes + + + diff --git a/composer.json b/composer.json index cd012cd..8ff7fcd 100644 --- a/composer.json +++ b/composer.json @@ -18,12 +18,12 @@ "ext-json": "*", "ext-mbstring": "*", "ext-iconv": "*", - "typo3/cms-core": "^11.5", + "typo3/cms-core": "^11.5 || ^12.4", "luracast/restler": "^5.0", "cweagans/composer-patches": "^1.7" }, "require-dev": { - "typo3/testing-framework": "^7.0.4", + "typo3/testing-framework": "^7.0.4 || ^8.0", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpcov": "*", "phpcompatibility/php-compatibility": "^9.3", @@ -65,11 +65,11 @@ ], "test:unit": [ "[ -e .Build/bin/phpunit ] || composer update", - "TYPO3_PATH_ROOT=.Build/Web .Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests-v10.xml Tests/Unit" + "XDEBUG_MODE=coverage TYPO3_PATH_ROOT=.Build/Web .Build/bin/phpunit -c Tests/phpunit.xml Tests/Unit" ], "test:unit-filter": [ "[ -e .Build/bin/phpunit ] || composer update", - "TYPO3_PATH_ROOT=.Build/Web .Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests-v10.xml Tests/Unit --filter=ExceptionHandlerTest" + "TYPO3_PATH_ROOT=.Build/Web .Build/bin/phpunit -c Tests/phpunit.xml Tests/Unit --filter=ExceptionHandlerTest" ], "code-style": [ "[ -e ./.Build/bin/rector ] || composer install", diff --git a/ext_localconf.php b/ext_localconf.php index b6625fb..d6af314 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -6,9 +6,7 @@ use TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend; use TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend; -if (!defined('TYPO3_MODE')) { - die('Access denied.'); -} +defined('TYPO3') or die(); // base restler annotations $restlerAnnotations = ['url',