/**
* Helper method
*/
- private function assertUrlIsCleaned($query='', $fragment='')
+ private function assertUrlIsCleaned($query = '', $fragment = '')
{
$url = new Url(self::$baseUrl.$query.$fragment);
$url->cleanup();
'about://reader?url=' . urlencode(self::$baseUrl .'?my=stuff&is=kept')
);
$this->assertEquals(self::$baseUrl.'?my=stuff&is=kept', $url->cleanup());
-
}
/**
* Test default http scheme.
*/
- public function testDefaultScheme() {
+ public function testDefaultScheme()
+ {
$url = new Url(self::$baseUrl);
$this->assertEquals('http', $url->getScheme());
$url = new Url('domain.tld');
/**
* Test add trailing slash.
*/
- function testAddTrailingSlash()
+ public function testAddTrailingSlash()
{
$strOn = 'http://randomstr.com/test/';
$strOff = 'http://randomstr.com/test';
/**
* Test valid HTTP url.
*/
- function testUrlIsHttp()
+ public function testUrlIsHttp()
{
$url = new Url(self::$baseUrl);
$this->assertTrue($url->isHttp());
/**
* Test non HTTP url.
*/
- function testUrlIsNotHttp()
+ public function testUrlIsNotHttp()
{
$url = new Url('ftp://save.tld/mysave');
$this->assertFalse($url->isHttp());
}
/**
- * Test IndToAscii.
+ * Test International Domain Name to ASCII conversion
*/
- function testIndToAscii()
+ public function testIdnToAscii()
{
$ind = 'http://www.académie-française.fr/';
$expected = 'http://www.xn--acadmie-franaise-npb1a.fr/';