]> git.mxchange.org Git - friendica-addons.git/blobdiff - dav/SabreDAV/tests/Sabre/DAV/ExceptionTest.php
Initial Release of the calendar plugin
[friendica-addons.git] / dav / SabreDAV / tests / Sabre / DAV / ExceptionTest.php
diff --git a/dav/SabreDAV/tests/Sabre/DAV/ExceptionTest.php b/dav/SabreDAV/tests/Sabre/DAV/ExceptionTest.php
new file mode 100644 (file)
index 0000000..a40f0ee
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+
+class Sabre_DAV_ExceptionTest extends PHPUnit_Framework_TestCase {
+
+    function testStatus() {
+
+        $e = new Sabre_DAV_Exception();
+        $this->assertEquals(500,$e->getHTTPCode());
+
+    }
+
+    function testExceptionStatuses() {
+
+        $c = array(
+            'Sabre_DAV_Exception_NotAuthenticated'    => 401,
+            'Sabre_DAV_Exception_InsufficientStorage' => 507,
+        );
+
+        foreach($c as $class=>$status) {
+
+            $obj = new $class();
+            $this->assertEquals($status, $obj->getHTTPCode());
+
+        }
+
+    }
+
+}