You are here

public function PluginBaseTest::testGetPluginDefinition 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::testGetPluginDefinition()

@covers ::getPluginDefinition

File

core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php, line 102
Contains \Drupal\Tests\Component\Plugin\PluginBaseTest.

Class

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

Namespace

Drupal\Tests\Component\Plugin

Code

public function testGetPluginDefinition() {
  $plugin_base = $this
    ->getMockForAbstractClass('Drupal\\Component\\Plugin\\PluginBase', array(
    array(),
    'plugin_id',
    array(
      'value',
      array(
        'key' => 'value',
      ),
    ),
  ));
  $this
    ->assertEquals(array(
    'value',
    array(
      'key' => 'value',
    ),
  ), $plugin_base
    ->getPluginDefinition());
}