Example #1
0
 public function testName()
 {
     $this->assertEquals('character', CssToken::name(0));
     $this->assertEquals('a legal non-alphanumeric character', CssToken::name(99));
     $this->assertEquals('end of file', CssToken::name(FALSE));
     $this->assertEquals(0, strpos(CssToken::name(22), 'illegal character'));
 }
Example #2
0
 private function throwError($expected, $got)
 {
     $filter = sprintf('Expected %s, got %s', CssToken::name($expected), CssToken::name($got));
     throw new CssParseException($filter);
 }