ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ExceptionTest.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\DAV;
4 
6 
7  function testStatus() {
8 
9  $e = new Exception();
10  $this->assertEquals(500, $e->getHTTPCode());
11 
12  }
13 
14  function testExceptionStatuses() {
15 
16  $c = [
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 }