function PluginTest::testGetProvider

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

Tests get provider.

File

core/tests/Drupal/Tests/Component/Annotation/PluginTest.php, line 59

Class

PluginTest
Tests Drupal\Component\Annotation\Plugin.

Namespace

Drupal\Tests\Component\Annotation

Code

public function testGetProvider() : void {
  $plugin = new Plugin([
    'provider' => 'example',
  ]);
  $this->assertEquals('example', $plugin->getProvider());
}

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