public static function url_encode($obj = null) { return urlencode(strval($obj)); }
public function test_url_encode() { $this->assertEquals('foo+bar', Helper::url_encode('foo bar')); $this->assertEquals('%23this', Helper::url_encode('#this')); $this->assertEquals('2%3E1', Helper::url_encode('2>1')); }