function PluginBaseTest::testGetPluginDefinition

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php \Drupal\Tests\Component\Plugin\PluginBaseTest::testGetPluginDefinition()
  2. 10 core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php \Drupal\Tests\Component\Plugin\PluginBaseTest::testGetPluginDefinition()
  3. 9 core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php \Drupal\Tests\Component\Plugin\PluginBaseTest::testGetPluginDefinition()
  4. 8.9.x core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php \Drupal\Tests\Component\Plugin\PluginBaseTest::testGetPluginDefinition()

Tests get plugin definition.

File

core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php, line 109

Class

PluginBaseTest
Tests Drupal\Component\Plugin\PluginBase.

Namespace

Drupal\Tests\Component\Plugin

Code

public function testGetPluginDefinition() : void {
  $plugin_base = new StubPluginBase([], 'plugin_id', [
    'value',
    [
      'key' => 'value',
    ],
  ]);
  $this->assertEquals([
    'value',
    [
      'key' => 'value',
    ],
  ], $plugin_base->getPluginDefinition());
}

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