ThemeEngineExtensionListTest.php

Same filename in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Extension/ThemeEngineExtensionListTest.php
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Extension/ThemeEngineExtensionListTest.php
  3. 11.x core/tests/Drupal/KernelTests/Core/Extension/ThemeEngineExtensionListTest.php

Namespace

Drupal\KernelTests\Core\Extension

File

core/tests/Drupal/KernelTests/Core/Extension/ThemeEngineExtensionListTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\KernelTests\Core\Extension;

use Drupal\KernelTests\KernelTestBase;

/**
 * @coversDefaultClass \Drupal\Core\Extension\ThemeEngineExtensionList
 * @group Extension
 */
class ThemeEngineExtensionListTest extends KernelTestBase {
    
    /**
     * @covers ::getList
     */
    public function testGetList() : void {
        // Confirm that all theme engines are available.
        $theme_engines = \Drupal::service('extension.list.theme_engine')->getList();
        $this->assertArrayHasKey('twig', $theme_engines);
        $this->assertArrayHasKey('nyan_cat', $theme_engines);
        $this->assertCount(2, $theme_engines);
    }

}

Classes

Title Deprecated Summary
ThemeEngineExtensionListTest @coversDefaultClass \Drupal\Core\Extension\ThemeEngineExtensionList @group Extension

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