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()); }
public function testEscapeCssReturnsEmptyStringAndDigitsAsIs() { $escaper = new Escaper('iso-8859-1'); $this->assertEquals('', $escaper->escapeCss('')); $this->assertEquals('123', $escaper->escapeCss('123')); }