From: cweiske Date: Fri, 20 Nov 2009 07:33:22 +0000 (+0000) Subject: test normalizing an address X-Git-Tag: v0.97~137 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=7431f632a43877705a80aa697d8d066959f181e8;p=semanticscuttle.git test normalizing an address git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@563 b3834d28-1941-0410-a4f8-b48e95affb8f --- diff --git a/tests/BookmarkTest.php b/tests/BookmarkTest.php index 7940d8d..48efd76 100644 --- a/tests/BookmarkTest.php +++ b/tests/BookmarkTest.php @@ -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') + ); + } + }