
| Current Path : /var/www/html/dataninja.cn/core/modules/system/tests/src/Functional/Theme/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/dataninja.cn/core/modules/system/tests/src/Functional/Theme/TwigEnvironmentTest.php |
<?php
namespace Drupal\Tests\system\Functional\Theme;
use Drupal\Tests\BrowserTestBase;
/**
* Tests Twig environment.
*
* @group Theme
*/
class TwigEnvironmentTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = ['twig_theme_test'];
/**
* Tests template class loading with Twig embed.
*/
public function testTwigEmbed() {
$assert_session = $this->assertSession();
// Test the Twig embed tag.
$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');
}
}