]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/tests/Sabre/DAV/ExceptionTest.php
Merge branch 'master' of git://github.com/friendica/friendica-addons
[friendica-addons.git] / dav / SabreDAV / tests / Sabre / DAV / ExceptionTest.php
1 <?php
2
3 class Sabre_DAV_ExceptionTest extends PHPUnit_Framework_TestCase {
4
5     function testStatus() {
6
7         $e = new Sabre_DAV_Exception();
8         $this->assertEquals(500,$e->getHTTPCode());
9
10     }
11
12     function testExceptionStatuses() {
13
14         $c = array(
15             'Sabre_DAV_Exception_NotAuthenticated'    => 401,
16             'Sabre_DAV_Exception_InsufficientStorage' => 507,
17         );
18
19         foreach($c as $class=>$status) {
20
21             $obj = new $class();
22             $this->assertEquals($status, $obj->getHTTPCode());
23
24         }
25
26     }
27
28 }