function PluginBaseTest::testGetBaseId

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

@dataProvider providerTestGetBaseId @coves ::getBaseId

File

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

Class

PluginBaseTest
@coversDefaultClass \Drupal\Component\Plugin\PluginBase @group Plugin

Namespace

Drupal\Tests\Component\Plugin

Code

public function testGetBaseId($plugin_id, $expected) : void {
    $plugin_base = new StubPluginBase([], $plugin_id, []);
    $this->assertEquals($expected, $plugin_base->getBaseId());
}

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