You are here

public function PluginBaseTest::testGetBaseId in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 48
Contains \Drupal\Tests\Component\Plugin\PluginBaseTest.

Class

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

Namespace

Drupal\Tests\Component\Plugin

Code

public function testGetBaseId($plugin_id, $expected) {

  /** @var \Drupal\Component\Plugin\PluginBase|\PHPUnit_Framework_MockObject_MockObject $plugin_base */
  $plugin_base = $this
    ->getMockForAbstractClass('Drupal\\Component\\Plugin\\PluginBase', array(
    array(),
    $plugin_id,
    array(),
  ));
  $this
    ->assertEquals($expected, $plugin_base
    ->getBaseId());
}