function TestDiscoveryTest::infoParserProvider

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::infoParserProvider()
  2. 10 core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::infoParserProvider()
  3. 9 core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::infoParserProvider()
  4. 8.9.x core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php \Drupal\Tests\Core\Test\TestDiscoveryTest::infoParserProvider()

File

core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php, line 40

Class

TestDiscoveryTest
Unit tests for test discovery.

Namespace

Drupal\Tests\Core\Test

Code

public static function infoParserProvider() : array {
  // A module provided unit test.
  $tests[] = [
    // Expected result.
[
      'name' => TestDatabaseTest::class,
      'group' => 'Test',
      'groups' => [
        'Test',
        'simpletest',
        'Template',
      ],
      'description' => 'Tests Drupal\\Core\\Test\\TestDatabase.',
      'type' => 'PHPUnit-Unit',
      'tests_count' => 4,
    ],
    // Classname.
TestDatabaseTest::class,
  ];
  // A core unit test.
  $tests[] = [
    // Expected result.
[
      'name' => 'Drupal\\Tests\\Core\\DrupalTest',
      'group' => 'DrupalTest',
      'groups' => [
        'DrupalTest',
      ],
      'description' => 'Tests Drupal.',
      'type' => 'PHPUnit-Unit',
      'tests_count' => 34,
    ],
    // Classname.
'Drupal\\Tests\\Core\\DrupalTest',
  ];
  // A component unit test.
  $tests[] = [
    // Expected result.
[
      'name' => 'Drupal\\Tests\\Component\\Plugin\\PluginBaseTest',
      'group' => 'Plugin',
      'groups' => [
        'Plugin',
      ],
      'description' => 'Tests Drupal\\Component\\Plugin\\PluginBase.',
      'type' => 'PHPUnit-Unit-Component',
      'tests_count' => 7,
    ],
    // Classname.
'Drupal\\Tests\\Component\\Plugin\\PluginBaseTest',
  ];
  // Functional PHPUnit test.
  $tests[] = [
    // Expected result.
[
      'name' => 'Drupal\\FunctionalTests\\BrowserTestBaseTest',
      'group' => 'browsertestbase',
      'groups' => [
        'browsertestbase',
      ],
      'description' => 'Tests BrowserTestBase functionality.',
      'type' => 'PHPUnit-Functional',
      'tests_count' => 21,
    ],
    // Classname.
'Drupal\\FunctionalTests\\BrowserTestBaseTest',
  ];
  // Kernel PHPUnit test.
  $tests['phpunit-kernel'] = [
    // Expected result.
[
      'name' => 'Drupal\\Tests\\file\\Kernel\\FileItemValidationTest',
      'group' => 'file',
      'groups' => [
        'file',
      ],
      'description' => 'Tests that files referenced in file and image fields are always validated.',
      'type' => 'PHPUnit-Kernel',
      'tests_count' => 2,
    ],
    // Classname.
'Drupal\\Tests\\file\\Kernel\\FileItemValidationTest',
  ];
  return $tests;
}

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