public function BlockManagerTest::testHandlePluginNotFound in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Block/BlockManagerTest.php \Drupal\Tests\Core\Block\BlockManagerTest::testHandlePluginNotFound()
- 9 core/tests/Drupal/Tests/Core/Block/BlockManagerTest.php \Drupal\Tests\Core\Block\BlockManagerTest::testHandlePluginNotFound()
@covers ::handlePluginNotFound
File
- core/
tests/ Drupal/ Tests/ Core/ Block/ BlockManagerTest.php, line 111
Class
- BlockManagerTest
- @coversDefaultClass \Drupal\Core\Block\BlockManager
Namespace
Drupal\Tests\Core\BlockCode
public function testHandlePluginNotFound() {
$this->logger
->warning('The "%plugin_id" was not found', [
'%plugin_id' => 'invalid',
])
->shouldBeCalled();
$plugin = $this->blockManager
->createInstance('invalid');
$this
->assertSame('broken', $plugin
->getPluginId());
}