Blame view

sources/3rdparty/sabre/dav/tests/Sabre/DAV/ExceptionTest.php 568 Bytes
6d9380f96   Cédric Dupont   Update sources OC...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  <?php
  
  namespace Sabre\DAV;
  
  class ExceptionTest extends \PHPUnit_Framework_TestCase {
  
      function testStatus() {
  
          $e = new 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());
  
          }
  
      }
  
  }