From 7431f632a43877705a80aa697d8d066959f181e8 Mon Sep 17 00:00:00 2001 From: cweiske Date: Fri, 20 Nov 2009 07:33:22 +0000 Subject: test normalizing an address git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@563 b3834d28-1941-0410-a4f8-b48e95affb8f --- tests/BookmarkTest.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests/BookmarkTest.php') 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') + ); + } + } -- cgit v1.2.3