public function testMediaAttributeAsCommaSeperatedString() { $this->helper->setIndent(4); $this->helper->appendStyle(' a { display: none; }', array('media' => 'screen,projection')); $string = $this->helper->toString(); $scripts = substr_count($string, ' <style'); $this->assertEquals(1, $scripts); $this->assertContains(' <!--', $string); $this->assertContains(' a {', $string); $this->assertContains(' media="screen,projection"', $string); }
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); }