function ThemeHandlerTest::testThemeLibrariesEmpty
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\ThemeHandlerTest::testThemeLibrariesEmpty()
- 8.9.x core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\ThemeHandlerTest::testThemeLibrariesEmpty()
- 10 core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\ThemeHandlerTest::testThemeLibrariesEmpty()
Tests empty libraries in theme.info.yml file.
File
-
core/
tests/ Drupal/ Tests/ Core/ Extension/ ThemeHandlerTest.php, line 100
Class
- ThemeHandlerTest
- @coversDefaultClass \Drupal\Core\Extension\ThemeHandler @group Extension
Namespace
Drupal\Tests\Core\ExtensionCode
public function testThemeLibrariesEmpty() : void {
$theme = new Extension($this->root, 'theme', 'core/modules/system/tests/themes/test_theme_libraries_empty', 'test_theme_libraries_empty.info.yml');
try {
$this->themeHandler
->addTheme($theme);
$this->assertTrue(TRUE, 'Empty libraries key in theme.info.yml does not cause PHP warning');
} catch (\Exception) {
$this->fail('Empty libraries key in theme.info.yml causes PHP warning.');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.