function ComponentPluginManagerTest::testFindEmptyMetadataFile

Same name in this branch
  1. 11.x core/tests/Drupal/Tests/Core/Theme/Component/ComponentPluginManagerTest.php \Drupal\Tests\Core\Theme\Component\ComponentPluginManagerTest::testFindEmptyMetadataFile()
Same name and namespace in other branches
  1. 10 core/modules/sdc/tests/src/Kernel/ComponentPluginManagerTest.php \Drupal\Tests\sdc\Kernel\ComponentPluginManagerTest::testFindEmptyMetadataFile()

Test that components render correctly.

File

core/modules/sdc/tests/src/Kernel/ComponentPluginManagerTest.php, line 29

Class

ComponentPluginManagerTest
Tests the component plugin manager.

Namespace

Drupal\Tests\sdc\Kernel

Code

public function testFindEmptyMetadataFile() : void {
    // Test that empty component metadata files are valid, since there is no
    // required property.
    $this->assertNotEmpty($this->manager
        ->find('sdc_theme_test:bar'));
    // Test that if the folder name does not match the machine name, the
    // component is still available.
    $this->assertNotEmpty($this->manager
        ->find('sdc_theme_test:foo'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.