function PluginBaseTest::testGetBaseId

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

Tests get base id.

@coves ::getBaseId

Attributes

#[DataProvider('providerTestGetBaseId')]

File

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

Class

PluginBaseTest
Tests Drupal\Component\Plugin\PluginBase.

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.