function ReflectionTest::providerGetParameterClassName

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Component/Utility/ReflectionTest.php \Drupal\Tests\Component\Utility\ReflectionTest::providerGetParameterClassName()
  2. 11.x core/tests/Drupal/Tests/Component/Utility/ReflectionTest.php \Drupal\Tests\Component\Utility\ReflectionTest::providerGetParameterClassName()

Data provider for ::testGetParameterClassName().

Return value

array[]

File

core/tests/Drupal/Tests/Component/Utility/ReflectionTest.php, line 32

Class

ReflectionTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Component%21Utility%21Reflection.php/class/Reflection/9" title="Provides helper methods for reflection." class="local">\Drupal\Component\Utility\Reflection</a> @group Utility

Namespace

Drupal\Tests\Component\Utility

Code

public function providerGetParameterClassName() {
    $reflection_method = new \ReflectionMethod(static::class, 'existsForTesting');
    $parameters = $reflection_method->getParameters();
    return [
        'string' => [
            NULL,
            $parameters[0],
        ],
        'array' => [
            NULL,
            $parameters[1],
        ],
        'same class' => [
            'Drupal\\Tests\\Component\\Utility\\ReflectionTest',
            $parameters[2],
        ],
        'class' => [
            'Drupal\\Component\\Utility\\Reflection',
            $parameters[3],
        ],
        'parent' => [
            'PHPUnit\\Framework\\TestCase',
            $parameters[4],
        ],
        'self' => [
            'Drupal\\Tests\\Component\\Utility\\ReflectionTest',
            $parameters[5],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.