function ThemeTestTwig::testTwigVariableDataTypes

Tests that the Twig engine handles PHP data correctly.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Theme/ThemeTestTwig.php, line 40
Contains \Drupal\system\Tests\Theme\ThemeTestTwig.

Class

ThemeTestTwig
Tests theme functions with the Twig engine.

Namespace

Drupal\system\Tests\Theme

Code

function testTwigVariableDataTypes() {
  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>');
  }
}