/** * @group ZF-12287 */ public function testNoEscapeTrue() { $this->helper->appendScript('// some script' . PHP_EOL, 'text/javascript', array('noescape' => true)); $test = $this->helper->toString(); $this->assertNotContains('//<!--', $test); $this->assertNotContains('//-->', $test); }
public function testIndentationIsHonored() { $this->helper->setIndent(4); $this->helper->appendScript(' var foo = "bar"; document.write(foo.strlen());'); $this->helper->appendScript(' var bar = "baz"; document.write(bar.strlen());'); $string = $this->helper->toString(); $scripts = substr_count($string, ' <script'); $this->assertEquals(2, $scripts); $this->assertContains(' //', $string); $this->assertContains(' var', $string); $this->assertContains(' document', $string); }