You are here

function BasicTest::testPluginInternals in Plug 7

Test plugin internals.

File

modules/plug_example/lib/Drupal/plug_example/Tests/BasicTest.php, line 131
Basic tests cases for plug_example module.

Class

BasicTest

Namespace

Drupal\plug_example\Tests

Code

function testPluginInternals() {

  /** @var \Drupal\plug_example\Plugin\name\JohnTest $plugin */
  $plugin = $this->manager
    ->createInstance('john_test', array(
    'em' => TRUE,
  ));
  $definition = $plugin
    ->getPluginDefinition();
  $expected = array(
    'class' => 'Drupal\\plug_example\\Plugin\\name\\JohnTest',
    'company' => FALSE,
    'id' => 'john_test',
    'provider' => 'plug_example',
  );
  $this
    ->assertEqual($expected, $definition);
}