ThemeEngineExtensionListTest.php in Drupal 8
File
core/tests/Drupal/KernelTests/Core/Extension/ThemeEngineExtensionListTest.php
View source
<?php
namespace Drupal\KernelTests\Core\Extension;
use Drupal\Core\Site\Settings;
use Drupal\KernelTests\KernelTestBase;
class ThemeEngineExtensionListTest extends KernelTestBase {
public function testGetlist() {
$settings = Settings::getAll();
$settings['install_profile'] = 'testing';
new Settings($settings);
$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);
}
}