public function testConditionalStylesheetCreationOccursWhenRequested() { $this->helper->setStylesheet('/styles.css', 'screen', 'ie6'); $item = $this->helper->getValue(); $this->assertObjectHasAttribute('conditionalStylesheet', $item); $this->assertEquals('ie6', $item->conditionalStylesheet); $string = $this->helper->toString(); $this->assertContains('/styles.css', $string); $this->assertContains('<!--[if ie6]>', $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); }