Example #1
0
File: page.php Project: cmsx/page
 function testCharset()
 {
     $p = new Page();
     $this->assertEquals('utf-8', $p->getCharset(), 'Стоит UTF-8 по-умолчанию');
     $exp = '<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />' . "\n";
     $this->assertEquals($exp, $p->renderCharset(), 'META-Тег charset');
     $exp = '<meta charset="windows-1251" />' . "\n";
     $p->setDoctype(Page::DOCTYPE_HTML_5);
     $p->setCharset('windows-1251');
     $this->assertEquals($exp, $p->renderCharset(), 'Для HTML5 допускается сокращенная форма');
 }