Commit 69e2771b authored by chihiro-adachi's avatar chihiro-adachi Committed by Fabien Potencier

Fix exception hander test

parent 541d590f
...@@ -38,6 +38,7 @@ matrix: ...@@ -38,6 +38,7 @@ matrix:
- php: 7.0 - php: 7.0
- php: 7.1 - php: 7.1
- php: hhvm - php: hhvm
dist: trusty
cache: cache:
directories: directories:
......
...@@ -35,7 +35,7 @@ class ExceptionHandlerTest extends TestCase ...@@ -35,7 +35,7 @@ class ExceptionHandlerTest extends TestCase
$request = Request::create('/foo'); $request = Request::create('/foo');
$response = $app->handle($request); $response = $app->handle($request);
$this->assertContains('<h1>Whoops, looks like something went wrong.</h1>', $response->getContent()); $this->assertContains('Whoops, looks like something went wrong.', $response->getContent());
$this->assertEquals(500, $response->getStatusCode()); $this->assertEquals(500, $response->getStatusCode());
} }
...@@ -62,7 +62,7 @@ class ExceptionHandlerTest extends TestCase ...@@ -62,7 +62,7 @@ class ExceptionHandlerTest extends TestCase
$request = Request::create('/foo'); $request = Request::create('/foo');
$response = $app->handle($request); $response = $app->handle($request);
$this->assertContains('<h1>Sorry, the page you are looking for could not be found.</h1>', $response->getContent()); $this->assertContains('Sorry, the page you are looking for could not be found.', $response->getContent());
$this->assertEquals(404, $response->getStatusCode()); $this->assertEquals(404, $response->getStatusCode());
} }
...@@ -86,7 +86,7 @@ class ExceptionHandlerTest extends TestCase ...@@ -86,7 +86,7 @@ class ExceptionHandlerTest extends TestCase
$request = Request::create('/foo', 'POST'); $request = Request::create('/foo', 'POST');
$response = $app->handle($request); $response = $app->handle($request);
$this->assertContains('<h1>Whoops, looks like something went wrong.</h1>', $response->getContent()); $this->assertContains('Whoops, looks like something went wrong.', $response->getContent());
$this->assertEquals(405, $response->getStatusCode()); $this->assertEquals(405, $response->getStatusCode());
$this->assertEquals('GET', $response->headers->get('Allow')); $this->assertEquals('GET', $response->headers->get('Allow'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment