Commit fea62ffc authored by catch's avatar catch
Browse files

Issue #3414969 by Spokje, smustgrave: Convert TwigLoaderTest into a Kernel test

(cherry picked from commit feb45311)
parent 7e7ec357
Loading
Loading
Loading
Loading
Loading
+5 −12
Original line number Diff line number Diff line
<?php

namespace Drupal\Tests\system\Functional\Theme;
namespace Drupal\Tests\system\Kernel\Theme;

use Drupal\Tests\BrowserTestBase;
use Drupal\KernelTests\KernelTestBase;

/**
 * Tests adding Twig loaders.
 *
 * @group Theme
 */
class TwigLoaderTest extends BrowserTestBase {

  /**
   * Modules to enable.
   *
   * @var array
   */
  protected static $modules = ['twig_loader_test'];
class TwigLoaderTest extends KernelTestBase {

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  protected static $modules = ['twig_loader_test'];

  /**
   * Tests adding an additional twig loader to the loader chain.
   */
  public function testTwigLoaderAddition() {
  public function testTwigLoaderAddition(): void {
    $environment = \Drupal::service('twig');

    $template = $environment->load('kittens');