[FEATURE] Backport Object Type Converter from Flow
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Unit / Reflection / ReflectionServiceTest.php
index 9af59f0..d3cd6d1 100644 (file)
@@ -35,12 +35,21 @@ class ReflectionServiceTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
        public function fixtureMethodForMethodTagsValues(array $foo) {
        }
 
        public function fixtureMethodForMethodTagsValues(array $foo) {
        }
 
+       /**
+        * @test
+        */
+       public function hasMethod() {
+               $service = new \TYPO3\CMS\Extbase\Reflection\ReflectionService();
+               $this->assertTrue($service->hasMethod(get_class($this), 'fixtureMethodForMethodTagsValues'));
+               $this->assertFalse($service->hasMethod(get_class($this), 'notExistentMethod'));
+       }
+
        /**
         * @test
         */
        public function getMethodTagsValues() {
                $service = new \TYPO3\CMS\Extbase\Reflection\ReflectionService();
        /**
         * @test
         */
        public function getMethodTagsValues() {
                $service = new \TYPO3\CMS\Extbase\Reflection\ReflectionService();
-               $tagsValues = $service->getMethodTagsValues('TYPO3\\CMS\\Extbase\\Tests\\Unit\\Reflection\\ReflectionServiceTest', 'fixtureMethodForMethodTagsValues');
+               $tagsValues = $service->getMethodTagsValues(get_class($this), 'fixtureMethodForMethodTagsValues');
                $this->assertEquals(array(
                        'param' => array('array $foo The foo parameter'),
                        'return' => array('void')
                $this->assertEquals(array(
                        'param' => array('array $foo The foo parameter'),
                        'return' => array('void')
@@ -52,7 +61,7 @@ class ReflectionServiceTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
         */
        public function getMethodParameters() {
                $service = new \TYPO3\CMS\Extbase\Reflection\ReflectionService();
         */
        public function getMethodParameters() {
                $service = new \TYPO3\CMS\Extbase\Reflection\ReflectionService();
-               $parameters = $service->getMethodParameters('TYPO3\\CMS\\Extbase\\Tests\\Unit\\Reflection\\ReflectionServiceTest', 'fixtureMethodForMethodTagsValues');
+               $parameters = $service->getMethodParameters(get_class($this), 'fixtureMethodForMethodTagsValues');
                $this->assertEquals(array(
                        'foo' => array(
                                'position' => 0,
                $this->assertEquals(array(
                        'foo' => array(
                                'position' => 0,