function DrupalComponentTest::providerAssertNoCoreUsage

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/DrupalComponentTest.php \Drupal\Tests\Component\DrupalComponentTest::providerAssertNoCoreUsage()
  2. 10 core/tests/Drupal/Tests/Component/DrupalComponentTest.php \Drupal\Tests\Component\DrupalComponentTest::providerAssertNoCoreUsage()

Data provider for testAssertNoCoreUsage().

Return value

array Data for testAssertNoCoreUsage() in the form:

  • TRUE if the test passes, FALSE otherwise.
  • File data as a string. This will be used as a virtual file.

File

core/tests/Drupal/Tests/Component/DrupalComponentTest.php, line 116

Class

DrupalComponentTest
General tests for \Drupal\Component that can't go anywhere else.

Namespace

Drupal\Tests\Component

Code

public static function providerAssertNoCoreUsage() {
    return [
        [
            TRUE,
            '@see \\Drupal\\Core\\Something',
        ],
        [
            FALSE,
            '\\Drupal\\Core\\Something',
        ],
        [
            FALSE,
            "@see \\Drupal\\Core\\Something\n" . '\\Drupal\\Core\\Something',
        ],
        [
            FALSE,
            "\\Drupal\\Core\\Something\n" . '@see \\Drupal\\Core\\Something',
        ],
    ];
}

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