]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
test normalizing an address
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Fri, 20 Nov 2009 07:33:22 +0000 (07:33 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Fri, 20 Nov 2009 07:33:22 +0000 (07:33 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@563 b3834d28-1941-0410-a4f8-b48e95affb8f

tests/BookmarkTest.php

index 7940d8d67fe99c9d3d5dc9d1eb4b22ca207536e6..48efd7615007fb096fed2b01842017f6bb8609b9 100644 (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')
+        );
+    }
+
 }