public function ComponentBlockDiscoveryTest::testDiscoveryAndDefaults in Component blocks 1.x
Same name and namespace in other branches
- 1.0.x tests/src/Kernel/ComponentBlockDiscoveryTest.php \Drupal\Tests\component_blocks\Kernel\ComponentBlockDiscoveryTest::testDiscoveryAndDefaults()
- 1.1.x tests/src/Kernel/ComponentBlockDiscoveryTest.php \Drupal\Tests\component_blocks\Kernel\ComponentBlockDiscoveryTest::testDiscoveryAndDefaults()
Tests discovery.
File
- tests/
src/ Kernel/ ComponentBlockDiscoveryTest.php, line 31
Class
- ComponentBlockDiscoveryTest
- Defines a class for testing component block discovery.
Namespace
Drupal\Tests\component_blocks\KernelCode
public function testDiscoveryAndDefaults() {
$blocks = \Drupal::service('plugin.manager.block')
->getDefinitions();
$this
->assertArrayHasKey('component_blocks:entity_test:test_component', $blocks);
}