You are here

public function DiscoveryTraitTest::providerHasDefinition in Drupal 8

Same name and namespace in other branches
  1. 9 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',
    ],
  ];
}