function DefaultLazyPluginCollectionTest::testGetNotExistingPlugin
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php \Drupal\Tests\Core\Plugin\DefaultLazyPluginCollectionTest::testGetNotExistingPlugin()
- 8.9.x core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php \Drupal\Tests\Core\Plugin\DefaultLazyPluginCollectionTest::testGetNotExistingPlugin()
- 10 core/tests/Drupal/Tests/Core/Plugin/DefaultLazyPluginCollectionTest.php \Drupal\Tests\Core\Plugin\DefaultLazyPluginCollectionTest::testGetNotExistingPlugin()
@covers ::get
File
-
core/
tests/ Drupal/ Tests/ Core/ Plugin/ DefaultLazyPluginCollectionTest.php, line 54
Class
- DefaultLazyPluginCollectionTest
- @coversDefaultClass \Drupal\Core\Plugin\DefaultLazyPluginCollection @group Plugin
Namespace
Drupal\Tests\Core\PluginCode
public function testGetNotExistingPlugin() : void {
$this->setupPluginCollection();
$this->expectException(PluginNotFoundException::class);
$this->expectExceptionMessage("Plugin ID 'pear' was not found.");
$this->defaultPluginCollection
->get('pear');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.