[BUGFIX] Rename Reflection\Service to Reflection\ReflectionService
authorAlexander Schnitzler <alex.schnitzler@typovision.de>
Fri, 16 Nov 2012 10:32:36 +0000 (11:32 +0100)
committerIngo Pfennigstorf <i.pfennigstorf@gmail.com>
Fri, 16 Nov 2012 10:36:56 +0000 (11:36 +0100)
Since it's renamed in Extbase it
has to be adjusted in Fluid also.

Releases: 6.0
Fixes: #43017
Change-Id: Ib26b999ba1f84dc5c56066ea7d671e15b4dec378
Reviewed-on: http://review.typo3.org/16464
Reviewed-by: Ingo Pfennigstorf
Tested-by: Ingo Pfennigstorf
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php
typo3/sysext/fluid/Tests/Unit/Core/ViewHelper/AbstractViewHelperTest.php

index c91f2eb..e4dcd22 100644 (file)
@@ -95,7 +95,7 @@ abstract class AbstractViewHelper {
        /**
         * Reflection service
         *
-        * @var \TYPO3\CMS\Extbase\Reflection\Service
+        * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService
         */
        private $reflectionService;
 
@@ -132,9 +132,9 @@ abstract class AbstractViewHelper {
        /**
         * Inject a Reflection service
         *
-        * @param \TYPO3\CMS\Extbase\Reflection\Service $reflectionService Reflection service
+        * @param \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService Reflection service
         */
-       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\Service $reflectionService) {
+       public function injectReflectionService(\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService) {
                $this->reflectionService = $reflectionService;
        }
 
index 2fdb104..2f7e899 100644 (file)
@@ -22,7 +22,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase
         * @test
         */
        public function argumentsCanBeRegistered() {
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\Service', array(), array(), '', FALSE);
+               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array(), array(), '', FALSE);
                $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render'), array(), '', FALSE);
                $viewHelper->injectReflectionService($mockReflectionService);
                $name = 'This is a name';
@@ -52,7 +52,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase
         * @test
         */
        public function overrideArgumentOverwritesExistingArgumentDefinition() {
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\Service', array(), array(), '', FALSE);
+               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array(), array(), '', FALSE);
                $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render'), array(), '', FALSE);
                $viewHelper->injectReflectionService($mockReflectionService);
                $name = 'argumentName';
@@ -72,7 +72,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase
         * @expectedException \TYPO3\CMS\Fluid\Core\ViewHelper\Exception
         */
        public function overrideArgumentThrowsExceptionWhenTryingToOverwriteAnNonexistingArgument() {
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\Service', array(), array(), '', FALSE);
+               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array(), array(), '', FALSE);
                $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render'), array(), '', FALSE);
                $viewHelper->injectReflectionService($mockReflectionService);
                $viewHelper->_call('overrideArgument', 'argumentName', 'string', 'description', TRUE);
@@ -82,7 +82,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase
         * @test
         */
        public function prepareArgumentsCallsInitializeArguments() {
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\Service', array(), array(), '', FALSE);
+               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array(), array(), '', FALSE);
                $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'initializeArguments'), array(), '', FALSE);
                $viewHelper->injectReflectionService($mockReflectionService);
                $viewHelper->expects($this->once())->method('initializeArguments');
@@ -100,7 +100,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase
                $dataCacheMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend', array(), array(), '', FALSE);
                $dataCacheMock->expects($this->any())->method('has')->will($this->returnValue(TRUE));
                $dataCacheMock->expects($this->any())->method('get')->will($this->returnValue(array()));
-               $reflectionService = new \TYPO3\CMS\Extbase\Reflection\Service();
+               $reflectionService = new \TYPO3\CMS\Extbase\Reflection\ReflectionService();
                $reflectionService->setDataCache($dataCacheMock);
                $viewHelper = new \TYPO3\CMS\Fluid\Tests\Unit\Core\Fixtures\TestViewHelper();
                $viewHelper->injectReflectionService($reflectionService);
@@ -124,7 +124,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase
                $dataCacheMock = $this->getMock('TYPO3\\CMS\\Core\\Cache\\Frontend\\VariableFrontend', array(), array(), '', FALSE);
                $dataCacheMock->expects($this->any())->method('has')->will($this->returnValue(TRUE));
                $dataCacheMock->expects($this->any())->method('get')->will($this->returnValue(array()));
-               $reflectionService = new \TYPO3\CMS\Extbase\Reflection\Service();
+               $reflectionService = new \TYPO3\CMS\Extbase\Reflection\ReflectionService();
                $reflectionService->setDataCache($dataCacheMock);
                $viewHelper = new \TYPO3\CMS\Fluid\Tests\Unit\Core\Fixtures\TestViewHelper2();
                $viewHelper->injectReflectionService($reflectionService);
@@ -140,7 +140,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase
         * @test
         */
        public function validateArgumentsCallsPrepareArguments() {
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\Service', array(), array(), '', FALSE);
+               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array(), array(), '', FALSE);
                $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'prepareArguments'), array(), '', FALSE);
                $viewHelper->injectReflectionService($mockReflectionService);
                $viewHelper->expects($this->once())->method('prepareArguments')->will($this->returnValue(array()));
@@ -161,7 +161,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase
         * @test
         */
        public function validateArgumentsCallsTheRightValidators() {
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\Service', array(), array(), '', FALSE);
+               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array(), array(), '', FALSE);
                $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'prepareArguments'), array(), '', FALSE);
                $viewHelper->injectReflectionService($mockReflectionService);
                $viewHelper->setArguments(array('test' => 'Value of argument'));
@@ -176,7 +176,7 @@ class AbstractViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase
         * @expectedException \InvalidArgumentException
         */
        public function validateArgumentsCallsTheRightValidatorsAndThrowsExceptionIfValidationIsWrong() {
-               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\Service', array(), array(), '', FALSE);
+               $mockReflectionService = $this->getMock('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService', array(), array(), '', FALSE);
                $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper', array('render', 'prepareArguments'), array(), '', FALSE);
                $viewHelper->injectReflectionService($mockReflectionService);
                $viewHelper->setArguments(array('test' => 'test'));