You are here

public function Twig_Test_EscapingTest::testJavascriptEscapingConvertsSpecialChars in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/twig/twig/test/Twig/Tests/escapingTest.php \Twig_Test_EscapingTest::testJavascriptEscapingConvertsSpecialChars()

File

vendor/twig/twig/test/Twig/Tests/escapingTest.php, line 166

Class

Twig_Test_EscapingTest
This class is adapted from code coming from Zend Framework.

Code

public function testJavascriptEscapingConvertsSpecialChars() {
  foreach ($this->jsSpecialChars as $key => $value) {
    $this
      ->assertEquals($value, twig_escape_filter($this->env, $key, 'js'), 'Failed to escape: ' . $key);
  }
}