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); $this->assertContains(' document', $string); }