Skip to content
Permalink
Browse files

Add a few more integration tests for the PSR7 http stack.

I think this covers all the cases I can think of right now.
  • Loading branch information...
markstory committed Jun 23, 2016
1 parent 38c903b commit 985d50c386f09b0a2cb7f672f2dd7ad90abce4d8
Showing with 29 additions and 0 deletions.
  1. +29 −0 tests/TestCase/TestSuite/IntegrationTestCaseTest.php
@@ -469,6 +469,20 @@ public function testWithExpectedException()
$this->assertResponseCode(500);
}
/**
* Test that exceptions being thrown are handled correctly by the psr7 stack.
*
* @return void
*/
public function testWithExpectedExceptionHttpServer()
{
DispatcherFactory::clear();
$this->useHttpServer(true);
$this->get('/tests_apps/throw_exception');
$this->assertResponseCode(500);
}
/**
* Test that exceptions being thrown are handled correctly.
*
@@ -493,6 +507,21 @@ public function testRedirect()
$this->assertResponseCode(302);
}
/**
* Test redirecting and psr7 stack
*
* @return void
*/
public function testRedirectHttpServer()
{
DispatcherFactory::clear();
$this->useHttpServer(true);
$this->post('/tests_apps/redirect_to');
$this->assertResponseCode(302);
$this->assertHeader('X-Middleware', 'true');
}
/**
* Test redirecting and integration tests.
*

0 comments on commit 985d50c

Please sign in to comment.
You can’t perform that action at this time.