You are here

public function YamlDiscoveryTest::testGetDefinition in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php \Drupal\Tests\Core\Plugin\Discovery\YamlDiscoveryTest::testGetDefinition()

Tests the getDefinition() method.

File

core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php, line 111

Class

YamlDiscoveryTest
@coversDefaultClass \Drupal\Core\Plugin\Discovery\YamlDiscovery @group Plugin

Namespace

Drupal\Tests\Core\Plugin\Discovery

Code

public function testGetDefinition() {
  $definitions = $this->discovery
    ->getDefinitions();

  // Test the getDefinition() method.
  foreach ($this->expectedKeys as $expected_key) {
    $this
      ->assertEquals($definitions[$expected_key], $this->discovery
      ->getDefinition($expected_key));
  }
}