ComponentBlockDiscoveryTest.php in Component blocks 1.x
File
tests/src/Kernel/ComponentBlockDiscoveryTest.php
View source
<?php
namespace Drupal\Tests\component_blocks\Kernel;
use Drupal\KernelTests\KernelTestBase;
class ComponentBlockDiscoveryTest extends KernelTestBase {
protected static $modules = [
'component_blocks',
'components',
'block',
'component_blocks_test',
'entity_test',
'ui_patterns',
'ui_patterns_library',
'system',
];
public function testDiscoveryAndDefaults() {
$blocks = \Drupal::service('plugin.manager.block')
->getDefinitions();
$this
->assertArrayHasKey('component_blocks:entity_test:test_component', $blocks);
}
}