function DefaultLazyPluginCollectionTest::testGetNotExistingPlugin
@covers ::get
File
-
core/
tests/ Drupal/ Tests/ Core/ Plugin/ DefaultLazyPluginCollectionTest.php, line 54
Class
- DefaultLazyPluginCollectionTest
- @coversDefaultClass \Drupal\Core\Plugin\DefaultLazyPluginCollection[[api-linebreak]] @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.