public function test_a() { $chars = array('\'' => ''', '"' => '"', '<' => '<', '>' => '>', '&' => '&', 'Ā' => 'Ā', ',' => ',', '.' => '.', '-' => '-', '_' => '_', 'a' => 'a', 'A' => 'A', 'z' => 'z', 'Z' => 'Z', '0' => '0', '9' => '9', "\r" => '
', "\n" => '
', "\t" => '	', "" => '�', '<' => '<', '>' => '>', '&' => '&', '"' => '"', ' ' => ' '); foreach ($chars as $key => $val) { $this->assertEquals($val, Escaper::a($key), 'Failed to escape: ' . $key); } }