Skip to content

Commit

Permalink
chore: prepare for TYPO3_v12
Browse files Browse the repository at this point in the history
  • Loading branch information
tlayh committed Jul 1, 2024
1 parent 102d561 commit a372e1d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 29 deletions.
2 changes: 2 additions & 0 deletions Tests/Unit/Configuration/ExtensionConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class ExtensionConfigurationTest extends BaseTestCase
*/
protected function setUp(): void
{
parent::setUp();

$mockedExtConfig = [
'refreshCache' => '0',
'productionContext' => '1',
Expand Down
43 changes: 21 additions & 22 deletions Tests/phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
<phpunit
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="../../../../typo3/sysext/core/Build/UnitTestsBootstrap.php"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false"
>
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="true"
bootstrap="../.Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php"
colors="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
requireCoverageMetadata="false"
>
<testsuites>
<testsuite name="restler">
<directory suffix="Test.php">./</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">../Classes</directory>
</whitelist>
</filter>
<php>
<const name="RESTLER_PHPUNIT_CONTEXT" value="1"/>
<env name="TYPO3_PATH_WEB" value="../../../.."/>
</php>
</phpunit>
<source>
<include>
<directory suffix=".php">../Classes</directory>
</include>
</source>
</phpunit>
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 1 addition & 3 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit a372e1d

Please sign in to comment.