Skip to content

Commit

Permalink
[TASK] Expect LocalizationUtility::configurationManager is gone (#497)
Browse files Browse the repository at this point in the history
TYPO3 v12 and v13 removes this property, so it can't be
reflected anymore. Current main/v8 TF should remove
this, while v7 (core v11 & v12) should implement a
fallback.

Releases: main, 7
  • Loading branch information
lolli42 authored Aug 28, 2023
1 parent 66141bd commit e353cbc
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Classes/Core/Unit/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,13 @@ protected function tearDown(): void

// Verify LocalizationUtility class internal state has been reset properly if a test fiddled with it
$reflectionClass = new \ReflectionClass(LocalizationUtility::class);
$property = $reflectionClass->getProperty('configurationManager');
$property->setAccessible(true);
self::assertNull($property->getValue());
try {
$property = $reflectionClass->getProperty('configurationManager');
$property->setAccessible(true);
self::assertNull($property->getValue());
} catch (\ReflectionException $e) {
// Do not assert if property does not exist - it has been removed in v12.
}
}

/**
Expand Down

0 comments on commit e353cbc

Please sign in to comment.