summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-11-20 07:33:22 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-11-20 07:33:22 +0000
commit7431f632a43877705a80aa697d8d066959f181e8 (patch)
tree99d6fd94792f892fbc8ba4419785651ba75911f0
parent48e00e8e18f9a80bb366921eab9b2cf7047e5954 (diff)
downloadsemanticscuttle-7431f632a43877705a80aa697d8d066959f181e8.tar.gz
semanticscuttle-7431f632a43877705a80aa697d8d066959f181e8.tar.bz2
test normalizing an address
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@563 b3834d28-1941-0410-a4f8-b48e95affb8f
-rw-r--r--tests/BookmarkTest.php22
1 files changed, 22 insertions, 0 deletions
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')
+ );
+ }
+
}