function PluginTest::testGetProvider

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

@covers ::getProvider

File

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

Class

PluginTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Component%21Annotation%21Plugin.php/class/Plugin/10" title="Defines a Plugin annotation object." class="local">\Drupal\Component\Annotation\Plugin</a> @group Annotation

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.