function PluginBaseTest::testGetDerivativeId

Tests get derivative id.

@legacy-covers ::getDerivativeId

Attributes

#[DataProvider('providerTestGetDerivativeId')]

File

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

Class

PluginBaseTest
Tests Drupal\Component\Plugin\PluginBase.

Namespace

Drupal\Tests\Component\Plugin

Code

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

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