|
@@ -496,6 +496,36 @@ class Zend_View_Helper_HeadLinkTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
|
|
|
$this->assertEquals($expected, $this->helper->toString());
|
|
$this->assertEquals($expected, $this->helper->toString());
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @group GH-515
|
|
|
|
|
+ */
|
|
|
|
|
+ public function testConditionalStylesheetCreationNoIE()
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->helper->setStylesheet('/styles.css', 'screen', '!IE');
|
|
|
|
|
+ $item = $this->helper->getValue();
|
|
|
|
|
+ $this->assertObjectHasAttribute('conditionalStylesheet', $item);
|
|
|
|
|
+ $this->assertEquals('!IE', $item->conditionalStylesheet);
|
|
|
|
|
+ $string = $this->helper->toString();
|
|
|
|
|
+ $this->assertContains('/styles.css', $string);
|
|
|
|
|
+ $this->assertContains('<!--[if !IE]><!--><', $string);
|
|
|
|
|
+ $this->assertContains('<!--<![endif]-->', $string);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @group GH-515
|
|
|
|
|
+ */
|
|
|
|
|
+ public function testConditionalStylesheetCreationNoIEWidthSpaces()
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->helper->setStylesheet('/styles.css', 'screen', '! IE');
|
|
|
|
|
+ $item = $this->helper->getValue();
|
|
|
|
|
+ $this->assertObjectHasAttribute('conditionalStylesheet', $item);
|
|
|
|
|
+ $this->assertEquals('! IE', $item->conditionalStylesheet);
|
|
|
|
|
+ $string = $this->helper->toString();
|
|
|
|
|
+ $this->assertContains('/styles.css', $string);
|
|
|
|
|
+ $this->assertContains('<!--[if ! IE]><!--><', $string);
|
|
|
|
|
+ $this->assertContains('<!--<![endif]-->', $string);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Call Zend_View_Helper_HeadLinkTest::main() if this source file is executed directly.
|
|
// Call Zend_View_Helper_HeadLinkTest::main() if this source file is executed directly.
|