You are here

function EngineTwigTest::testTwigVariableDataTypes in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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\Theme

Code

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>');
  }
}