コード例 #1
0
 public function testIsServerError()
 {
     $e = new StatusCodeException('foo', 500);
     $this->assertFalse($e->isInformational());
     $this->assertFalse($e->isSuccessful());
     $this->assertFalse($e->isRedirection());
     $this->assertFalse($e->isClientError());
     $this->assertTrue($e->isServerError());
 }
コード例 #2
0
ファイル: RedirectionException.php プロジェクト: seytar/psx
 public function __construct($statusCode, $location = null)
 {
     parent::__construct('Redirect exception', $statusCode);
     $this->location = $location;
 }