[BUGFIX] Use `new` in ReflectionServiceTest 64/55164/4
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Tue, 19 Dec 2017 18:09:17 +0000 (19:09 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 20 Dec 2017 15:31:51 +0000 (16:31 +0100)
Resolves: #83390
Releases: master
Change-Id: I1883a855ae818295eec9cd8b4ae2baeb93eff05c
Reviewed-on: https://review.typo3.org/55164
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Sebastian Fischer <typo3@evoweb.de>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/extbase/Tests/Unit/Reflection/ReflectionServiceTest.php

index 3bbceaf..04838fb 100644 (file)
@@ -14,7 +14,6 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Reflection;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Reflection\ReflectionService;
 
 /**
@@ -46,7 +45,7 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
      */
     public function getClassTagsValues()
     {
-        $service = GeneralUtility::makeInstance(ReflectionService::class);
+        $service = new ReflectionService();
         $classValues = $service->getClassTagsValues(static::class);
         $this->assertEquals([
             'see' => ['test for reflection'],
@@ -64,7 +63,7 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
      */
     public function getClassTagValues()
     {
-        $service = GeneralUtility::makeInstance(ReflectionService::class);
+        $service = new ReflectionService();
         $classValues = $service->getClassTagValues(static::class, 'see');
         $this->assertEquals([
             'test for reflection',
@@ -86,7 +85,7 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
      */
     public function hasMethod()
     {
-        $service = GeneralUtility::makeInstance(ReflectionService::class);
+        $service = new ReflectionService();
         $this->assertTrue($service->hasMethod(static::class, 'fixtureMethodForMethodTagsValues'));
         $this->assertFalse($service->hasMethod(static::class, 'notExistentMethod'));
         $this->assertFalse($service->hasMethod('NonExistantNamespace\\NonExistantClass', 'notExistentMethod'));
@@ -97,7 +96,7 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
      */
     public function getMethodTagsValues()
     {
-        $service = GeneralUtility::makeInstance(ReflectionService::class);
+        $service = new ReflectionService();
         $tagsValues = $service->getMethodTagsValues(static::class, 'fixtureMethodForMethodTagsValues');
         $this->assertEquals([
             'param' => ['array $foo The foo parameter'],
@@ -120,7 +119,7 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
      */
     public function getMethodParameters()
     {
-        $service = GeneralUtility::makeInstance(ReflectionService::class);
+        $service = new ReflectionService();
         $parameters = $service->getMethodParameters(static::class, 'fixtureMethodForMethodTagsValues');
         $this->assertSame([
             'foo' => [
@@ -155,7 +154,7 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
      */
     public function getMethodParametersWithShortTypeNames()
     {
-        $service = GeneralUtility::makeInstance(ReflectionService::class);
+        $service = new ReflectionService();
         $parameters = $service->getMethodParameters(static::class, 'fixtureMethodForMethodTagsValuesWithShortTypes');
         $this->assertSame([
             'dummy' => [
@@ -191,7 +190,7 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
 
     public function testIsClassTaggedWith()
     {
-        $service = GeneralUtility::makeInstance(ReflectionService::class);
+        $service = new ReflectionService();
         $this->assertTrue($service->isClassTaggedWith(
             Fixture\DummyClassWithTags::class,
             'see'
@@ -210,7 +209,7 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
 
     public function testIsPropertyTaggedWith()
     {
-        $service = GeneralUtility::makeInstance(ReflectionService::class);
+        $service = new ReflectionService();
         $this->assertTrue($service->isPropertyTaggedWith(
             Fixture\DummyClassWithAllTypesOfProperties::class,
             'propertyWithInjectAnnotation',
@@ -238,8 +237,7 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
 
     public function testgetPropertyTagValues()
     {
-        $service = GeneralUtility::makeInstance(ReflectionService::class);
-
+        $service = new ReflectionService();
         $this->assertSame(
             [],
             $service->getPropertyTagValues(
@@ -261,8 +259,7 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
 
     public function testGetPropertyTagsValues()
     {
-        $service = GeneralUtility::makeInstance(ReflectionService::class);
-
+        $service = new ReflectionService();
         $this->assertSame(
             [
                 'inject' => [],
@@ -295,8 +292,7 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
 
     public function testGetClassPropertyNames()
     {
-        $service = GeneralUtility::makeInstance(ReflectionService::class);
-
+        $service = new ReflectionService();
         $this->assertSame(
             [
                 'publicProperty',