function ThemeHandlerTest::testMissingTheme

Same name in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php \Drupal\Tests\Core\Extension\ThemeHandlerTest::testMissingTheme()

Test that a missing theme doesn't break ThemeHandler::listInfo().

@covers ::listInfo

File

core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php, line 116

Class

ThemeHandlerTest
@coversDefaultClass \Drupal\Core\Extension\ThemeHandler @group Extension

Namespace

Drupal\Tests\Core\Extension

Code

public function testMissingTheme() : void {
    $themes = $this->themeHandler
        ->listInfo();
    $this->assertSame([], $themes);
}

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