function BaseThemeMissingTest::testMissingBaseThemeException

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php \Drupal\KernelTests\Core\Theme\BaseThemeMissingTest::testMissingBaseThemeException()
  2. 11.x core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php \Drupal\KernelTests\Core\Theme\BaseThemeMissingTest::testMissingBaseThemeException()

Tests exception is thrown.

File

core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php, line 49

Class

BaseThemeMissingTest
Tests the behavior of a theme when base_theme info key is missing.

Namespace

Drupal\KernelTests\Core\Theme

Code

public function testMissingBaseThemeException() : void {
    $this->expectException(InfoParserException::class);
    $this->expectExceptionMessage('Missing required key ("base theme") in core/tests/fixtures/test_missing_base_theme/test_missing_base_theme.info.yml, see https://www.drupal.org/node/3066038');
    $this->themeInstaller
        ->install([
        'test_missing_base_theme',
    ]);
}

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