TwigEnvironmentTest.php in Drupal 9
File
core/modules/system/tests/src/Functional/Theme/TwigEnvironmentTest.php
View source
<?php
namespace Drupal\Tests\system\Functional\Theme;
use Drupal\Tests\BrowserTestBase;
class TwigEnvironmentTest extends BrowserTestBase {
protected static $modules = [
'twig_theme_test',
];
protected $defaultTheme = 'stark';
public function testTwigEmbed() {
$assert_session = $this
->assertSession();
$this
->drupalGet('twig-theme-test/embed-tag');
$assert_session
->statusCodeEquals(200);
$assert_session
->responseContains('This line is from twig_theme_test/templates/twig-theme-test-embed-tag-embedded.html.twig');
}
}