コード例 #1
0
 public function testRedirectSetsCode()
 {
     $response = new Response(new App());
     try {
         $response->redirect('example.com', 'auto', 307);
         $this->fail('RedirectException should be raised.');
     } catch (RedirectException $e) {
     }
     $this->assertTrue($response->hasHeader('location'));
     $this->assertEquals('example.com', $response->getHeaderLine('Location'));
     $this->assertEquals(307, $response->getStatusCode());
 }