[BUGFIX] Add checks to ReflectionService to have correct return values
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Reflection / ReflectionServiceTest.php
index 538ef66..680741a 100644 (file)
@@ -70,6 +70,11 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
             'test for reflection',
         ], $classValues);
 
+        $this->assertEquals(
+            [],
+            $service->getClassTagValues(static::class, 'nonExistantTag')
+        );
+
         $this->assertEquals(
             [],
             $service->getClassTagValues('NonExistantNamespace\\NonExistantClass', 'nonExistantTag')
@@ -99,6 +104,11 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
             'return' => ['string']
         ], $tagsValues);
 
+        $this->assertEquals(
+            [],
+            $service->getMethodTagsValues(static::class, 'notExistentMethod')
+        );
+
         $this->assertEquals(
             [],
             $service->getMethodTagsValues('NonExistantNamespace\\NonExistantClass', 'notExistentMethod')
@@ -129,6 +139,11 @@ class ReflectionServiceTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCa
             ]
         ], $parameters);
 
+        $this->assertSame(
+            [],
+            $service->getMethodParameters(static::class, 'notExistentMethod')
+        );
+
         $this->assertSame(
             [],
             $service->getMethodParameters('NonExistantNamespace\\NonExistantClass', 'notExistentMethod')