Follow-up to test #12153: Refactored browserInfoHookIsCalled() test case
authorOliver Hader <oliver.hader@typo3.org>
Mon, 19 Oct 2009 20:39:17 +0000 (20:39 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 19 Oct 2009 20:39:17 +0000 (20:39 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6170 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
tests/t3lib/t3lib_matchcondition_testcase.php

index 8d6a4fe..d220878 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-10-19  Oliver Hader  <oliver@typo3.org>
 
        * Follow-up to test #12153: Fixed bug in language condition tests
+       * Follow-up to test #12153: Refactored browserInfoHookIsCalled() test case
 
 2009-10-19  Rupert Germann  <rupi@gmx.li>
 
index 7fdb45d..e3b5eba 100644 (file)
@@ -53,6 +53,7 @@ class t3lib_matchCondition_testcase extends tx_phpunit_testcase {
                        '_POST' => $_POST,
                        '_SERVER' => $_SERVER,
                        'TYPO3_CONF_VARS' => $GLOBALS['TYPO3_CONF_VARS'],
+                       'T3_VAR' => $GLOBALS['T3_VAR'],
                );
 
                $this->testGlobalNamespace = uniqid('TEST');
@@ -142,10 +143,14 @@ class t3lib_matchCondition_testcase extends tx_phpunit_testcase {
         * @test
         */
        public function browserInfoHookIsCalled() {
-               $browserInfoHookMock = $this->getMock(uniqid('tx_browserInfoHook'), array('browserInfo'));
+               $classRef = uniqid('tx_browserInfoHook');
+               $browserInfoHookMock = $this->getMock($classRef, array('browserInfo'));
                $browserInfoHookMock->expects($this->atLeastOnce())->method('browserInfo');
-               $this->matchCondition->hookObjectsArr = array($browserInfoHookMock);
 
+               $GLOBALS['T3_VAR']['getUserObj'][$classRef] = $browserInfoHookMock;
+               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_matchcondition.php']['matchConditionClass'][$classRef] = $classRef;
+
+               $this->matchCondition->__construct();
                $this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]');
        }