コード例 #1
0
 /**
  * @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);
 }
コード例 #2
0
    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);
    }
コード例 #3
0
    /**
     * @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);
    }
コード例 #4
0
ファイル: HeadStyleTest.php プロジェクト: lortnus/zf1
    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);
    }