/** * @group ZF-9532 */ public function testRenderConditionalCommentsShouldNotContainHtmlEscaping() { $style = 'a{display:none;}'; $this->helper->appendStyle($style, array('conditional' => 'IE 8')); $value = $this->helper->toString(); $this->assertNotContains('<!--' . PHP_EOL, $value); $this->assertNotContains(PHP_EOL . '-->', $value); }
public function testConditionalScript() { $this->helper->appendStyle(' a { display: none; }', array('media' => 'screen,projection', 'conditional' => 'lt IE 7')); $test = $this->helper->toString(); $this->assertContains('<!--[if lt IE 7]>', $test); }
/** * @group GH-515 */ public function testConditionalScriptNoIEWidthSpace() { $this->helper->appendStyle(' a { display: none; }', array('media' => 'screen,projection', 'conditional' => '! IE')); $test = $this->helper->toString(); $this->assertContains('<!--[if ! IE]><!--><', $test); $this->assertContains('<!--<![endif]-->', $test); }
public function testIndentationIsHonored() { $this->helper->setIndent(4); $this->helper->appendStyle(' a { display: none; }'); $this->helper->appendStyle(' h1 { font-weight: bold }'); $string = $this->helper->toString(); $scripts = substr_count($string, ' <style'); $this->assertEquals(2, $scripts); $this->assertContains(' <!--', $string); $this->assertContains(' a {', $string); $this->assertContains(' h1 {', $string); $this->assertContains(' display', $string); $this->assertContains(' font-weight', $string); $this->assertContains(' }', $string); }