Skip to content
Snippets Groups Projects
Commit 433c242e authored by Anja Leichsenring's avatar Anja Leichsenring Committed by Christian Kuhn
Browse files

[TASK] Add integrity test for LocalizationUtility

A cross dependency in unit tests has been discovered. To make sure
there are no more of this, an integrity test has been added. In makes
sure the configurationManager property of this class is still null.

Resolves: #77334
Releases: master
Change-Id: I2f8ae127a56c6cfae9754e12e87b2ef5709564d3
Reviewed-on: https://review.typo3.org/49286


Tested-by: default avatarBamboo TYPO3com <info@typo3.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 79aed128
Branches
Tags
No related merge requests found
......@@ -13,6 +13,7 @@ namespace TYPO3\CMS\Core\Tests\Integrity;
*
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
/**
* This test case is used in test suites to check for healthy
......@@ -41,4 +42,19 @@ class IntegrityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
$this->assertArrayHasKey(\TYPO3\CMS\Core\Cache\CacheManager::class, $registeredSingletons);
$this->assertTrue($registeredSingletons[\TYPO3\CMS\Core\Cache\CacheManager::class] instanceof \TYPO3\CMS\Core\Cache\CacheManager);
}
/**
* This test fails if any test case manipulates the configurationManager
* property in LocalizationUtility due to mocking and fails to restore it
* properly.
*
* @test
*/
public function ensureLocalisationUtilityConfigurationManagerIsNull()
{
$reflectionClass = new \ReflectionClass(LocalizationUtility::class);
$property = $reflectionClass->getProperty('configurationManager');
$property->setAccessible(true);
$this->assertNull($property->getValue());
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment