1<?php
2
3namespace Sabre\DAV;
4
5class ExceptionTest extends \PHPUnit_Framework_TestCase {
6
7    function testStatus() {
8
9        $e = new Exception();
10        $this->assertEquals(500,$e->getHTTPCode());
11
12    }
13
14    function testExceptionStatuses() {
15
16        $c = array(
17            'Sabre\\DAV\\Exception\\NotAuthenticated'    => 401,
18            'Sabre\\DAV\\Exception\\InsufficientStorage' => 507,
19        );
20
21        foreach($c as $class=>$status) {
22
23            $obj = new $class();
24            $this->assertEquals($status, $obj->getHTTPCode());
25
26        }
27
28    }
29
30}
31