]> git.mxchange.org Git - friendica-addons.git/blobdiff - dav/SabreDAV/tests/Sabre/HTTP/BasicAuthTest.php
Notifications by E-Mail implemented
[friendica-addons.git] / dav / SabreDAV / tests / Sabre / HTTP / BasicAuthTest.php
index b5dd5144554210eebe0408b2c7a8266dd9a1f2c8..1bebcf85e461fddfc3a36e996c6cd12c03dec362 100644 (file)
@@ -60,6 +60,25 @@ class Sabre_HTTP_BasicAuthTest extends PHPUnit_Framework_TestCase {
 
     }
 
+    function testGetUserPassWithColon() {
+
+        $server = array(
+            'HTTP_AUTHORIZATION' => 'Basic ' . base64_encode('admin:1234:5678'),
+        );
+
+        $request = new Sabre_HTTP_Request($server);
+        $this->basicAuth->setHTTPRequest($request);
+
+        $userPass = $this->basicAuth->getUserPass();
+
+        $this->assertEquals(
+            array('admin','1234:5678'),
+            $userPass,
+            'We did not get the username and password we expected'
+        );
+
+    }
+
     function testGetUserPassApacheEdgeCase() {
 
         $server = array(