function DiscoveryTraitTest::providerHasDefinition

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php \Drupal\Tests\Component\Plugin\Discovery\DiscoveryTraitTest::providerHasDefinition()
  2. 10 core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php \Drupal\Tests\Component\Plugin\Discovery\DiscoveryTraitTest::providerHasDefinition()
  3. 11.x core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php \Drupal\Tests\Component\Plugin\Discovery\DiscoveryTraitTest::providerHasDefinition()

Data provider for testHasDefinition().

Return value

array

  • Expected TRUE or FALSE.
  • Plugin ID to look for.

File

core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php, line 120

Class

DiscoveryTraitTest
@group Plugin @coversDefaultClass \Drupal\Component\Plugin\Discovery\DiscoveryTrait

Namespace

Drupal\Tests\Component\Plugin\Discovery

Code

public function providerHasDefinition() {
    return [
        [
            TRUE,
            'valid',
        ],
        [
            FALSE,
            'not_valid',
        ],
    ];
}

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