Esempio n. 1
0
File: page.php Progetto: cmsx/page
 function testCSS()
 {
     $p = new Page();
     $this->assertEmpty($p->renderCSS(), 'Стили не заданы');
     $p->addCSS('test.css')->addCSS('print.css', 'print')->addCSS('ie.css', null, 'IE gt 7');
     $exp = '<link href="test.css" media="all" rel="stylesheet" type="text/css" />' . "\n" . '<link href="print.css" media="print" rel="stylesheet" type="text/css" />' . "\n" . '<!--[if IE gt 7]><link href="ie.css" media="all" rel="stylesheet" type="text/css" /><![endif]-->' . "\n";
     $this->assertEquals($exp, $p->renderCSS(), 'Сформированный HTML');
     $p->clearCSS();
     $this->assertEmpty($p->renderCSS(), 'Стили удалены');
 }