function YamlDiscoveryTest::testGetDefinition

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php \Drupal\Tests\Core\Plugin\Discovery\YamlDiscoveryTest::testGetDefinition()
  2. 10 core/tests/Drupal/Tests/Core/Plugin/Discovery/YamlDiscoveryTest.php \Drupal\Tests\Core\Plugin\Discovery\YamlDiscoveryTest::testGetDefinition()
  3. 11.x 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 114

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));
    }
}

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