예제 #1
0
파일: TagTest.php 프로젝트: phower/html
 public function testTimeMethodGeneratesANewTimeTag()
 {
     $escaper = new Escaper();
     $now = date('c');
     $tag = Tag::time('now', $now);
     $this->assertEquals('time', $tag->getName());
     $expected = sprintf('<time datetime="%s">now</time>', $escaper->escapeAttribute($now));
     $this->assertEquals($expected, $tag->render());
 }
예제 #2
0
 public function testEscapeCssReturnsEmptyStringAndDigitsAsIs()
 {
     $escaper = new Escaper('iso-8859-1');
     $this->assertEquals('', $escaper->escapeCss(''));
     $this->assertEquals('123', $escaper->escapeCss('123'));
 }