[TASK] Add a function for clearing the rootline caches
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Tests / Unit / Utility / RootlineUtilityTest.php
index e2f11f1..b65ce00 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Core\Tests\Unit\Utility;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Utility\RootlineUtility;
+
 /**
  * Testcase for class \TYPO3\CMS\Core\Utility\RootlineUtility
  *
@@ -22,7 +24,7 @@ namespace TYPO3\CMS\Core\Tests\Unit\Utility;
 class RootlineUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
        /**
-        * @var \TYPO3\CMS\Core\Utility\RootlineUtility|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface|\PHPUnit_Framework_MockObject_MockObject
+        * @var RootlineUtility|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface|\PHPUnit_Framework_MockObject_MockObject
         */
        protected $fixture;
 
@@ -31,11 +33,15 @@ class RootlineUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         */
        protected $pageContextMock;
 
-       public function setUp() {
+       protected function setUp() {
                $this->pageContextMock = $this->getMock('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
-               $this->fixture = $this->getAccessibleMock('\TYPO3\CMS\Core\Utility\RootlineUtility', array('enrichWithRelationFields'), array(1, '', $this->pageContextMock));
+               $this->fixture = $this->getAccessibleMock('TYPO3\\CMS\\Core\\Utility\\RootlineUtility', array('enrichWithRelationFields'), array(1, '', $this->pageContextMock));
        }
 
+       protected function tearDown() {
+               parent::tearDown();
+               RootlineUtility::purgeCaches();
+       }
 
        /***
         *