public function DefaultLazyPluginCollectionTest::testGetNotExistingPlugin in Drupal 9
Same name and namespace in other branches
- 8 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 52
Class
- DefaultLazyPluginCollectionTest
- @coversDefaultClass \Drupal\Core\Plugin\DefaultLazyPluginCollection @group Plugin
Namespace
Drupal\Tests\Core\PluginCode
public function testGetNotExistingPlugin() {
$this
->setupPluginCollection();
$this
->expectException(PluginNotFoundException::class);
$this
->expectExceptionMessage("Plugin ID 'pear' was not found.");
$this->defaultPluginCollection
->get('pear');
}