test normalizing an address

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@563 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
cweiske 2009-11-20 07:33:22 +00:00
parent 48e00e8e18
commit 7431f632a4

View file

@ -630,6 +630,28 @@ class BookmarkTest extends TestBase
$this->assertEquals(-1, $bm['vote']);
}
public function testNormalize()
{
$this->assertEquals(
'http://example.org', $this->bs->normalize('http://example.org')
);
$this->assertEquals(
'ftp://example.org', $this->bs->normalize('ftp://example.org')
);
$this->assertEquals(
'http://example.org', $this->bs->normalize('http://example.org/')
);
$this->assertEquals(
'http://example.org', $this->bs->normalize('example.org')
);
$this->assertEquals(
'mailto:foo@example.org',
$this->bs->normalize('mailto:foo@example.org')
);
}
}