[BUGFIX] TypoScriptParserTest uses superfluous mock object 81/19481/2
authorOliver Hader <oliver@typo3.org>
Mon, 1 Apr 2013 10:29:42 +0000 (12:29 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 1 Apr 2013 10:34:32 +0000 (12:34 +0200)
TypoScriptParserTest uses superfluous mock object just to
call protected methods but without using mock behaviour.

Change-Id: Iaf8ed0150e63b5da4185dccbcf3dbd5eaa0cf94f
Fixes: #46833
Releases: 6.1
Reviewed-on: https://review.typo3.org/19481
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/core/Tests/Unit/TypoScript/Parser/TypoScriptParserTest.php

index ff50247..51bc89b 100644 (file)
@@ -25,12 +25,12 @@ namespace TYPO3\CMS\Core\Tests\Unit\TypoScript\Parser;
  ***************************************************************/
 
 /**
- * Test case
+ * Test case for \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
  */
 class TypoScriptParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
 
        /**
-        * @var \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface
+        * @var \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser|\TYPO3\CMS\Core\Tests\AccessibleObjectInterface
         */
        protected $typoScriptParser;
 
@@ -40,9 +40,8 @@ class TypoScriptParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        protected function setUp() {
-               $this->typoScriptParser = $this->getAccessibleMock(
-                       'TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser', array('dummy'), array(), '', FALSE
-               );
+               $accessibleClassName = $this->buildAccessibleProxy('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
+               $this->typoScriptParser = new $accessibleClassName();
        }
 
        /**
@@ -242,5 +241,4 @@ class TypoScriptParserTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        }
 
 }
-
 ?>
\ No newline at end of file