function EngineTwigTest::testTwigVariableDataTypes in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/src/Tests/Theme/EngineTwigTest.php \Drupal\system\Tests\Theme\EngineTwigTest::testTwigVariableDataTypes()
Tests that the Twig engine handles PHP data correctly.
File
- core/
modules/ system/ src/ Tests/ Theme/ EngineTwigTest.php, line 35 - Contains \Drupal\system\Tests\Theme\EngineTwigTest.
Class
- EngineTwigTest
- Tests Twig-specific theme functionality.
Namespace
Drupal\system\Tests\ThemeCode
function testTwigVariableDataTypes() {
$this
->config('system.theme')
->set('default', 'test_theme')
->save();
$this
->drupalGet('twig-theme-test/php-variables');
foreach (_test_theme_twig_php_values() as $type => $value) {
$this
->assertRaw('<li>' . $type . ': ' . $value['expected'] . '</li>');
}
}