[BUGFIX] Tests: Incomplete mocking in backend condition matcher 88/28388/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 14 Mar 2014 14:17:25 +0000 (15:17 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 14 Mar 2014 15:49:19 +0000 (16:49 +0100)
Mock deterimenRootline to suppress calling database stuff
in dependencies.

Change-Id: I54938f9e20d52eda568c6520fa7bd72ec19b61e2
Resolves: #56912
Related: #51436
Releases: 6.2
Reviewed-on: https://review.typo3.org/28388
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php

index 7717a0f..9aa784d 100644 (file)
@@ -47,12 +47,12 @@ class ConditionMatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        protected $testTableName;
 
        public function setUp() {
-               $this->testTableName = 'TYPO3\\CMS\\Backend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher_testTable';
+               $this->testTableName = 'conditionMatcherTestTable';
                $this->testGlobalNamespace = uniqid('TEST');
                $GLOBALS['TCA'][$this->testTableName] = array('ctrl' => array());
                $GLOBALS[$this->testGlobalNamespace] = array();
                $this->setUpBackend();
-               $this->matchCondition = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher');
+               $this->matchCondition = $this->getMock('TYPO3\\CMS\\Backend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher', array('determineRootline'), array(), '', FALSE);
        }
 
        private function setUpBackend() {