You are here

public function ComponentDiscoveryTest::testGetSubComponents in Lightning Core 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/Kernel/ComponentDiscoveryTest.php \Drupal\Tests\lightning_core\Kernel\ComponentDiscoveryTest::testGetSubComponents()
  2. 8.3 tests/src/Kernel/ComponentDiscoveryTest.php \Drupal\Tests\lightning_core\Kernel\ComponentDiscoveryTest::testGetSubComponents()

@covers ::getSubComponents

File

tests/src/Kernel/ComponentDiscoveryTest.php, line 64

Class

ComponentDiscoveryTest
@group lightning @group lightning_core

Namespace

Drupal\Tests\lightning_core\Kernel

Code

public function testGetSubComponents() {
  $components = $this->discovery
    ->getSubComponents();
  $this
    ->assertInstanceOf(Extension::class, $components['lightning_contact_form']);
  $this
    ->assertInstanceOf(Extension::class, $components['lightning_page']);
  $this
    ->assertInstanceOf(Extension::class, $components['lightning_roles']);
  $this
    ->assertInstanceOf(Extension::class, $components['lightning_search']);
  $this
    ->assertArrayNotHasKey('lightning_core', $components);
}