public function FlattenExceptionTest::testFlattenHttpException in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php \Symfony\Component\Debug\Tests\Exception\FlattenExceptionTest::testFlattenHttpException()
@dataProvider flattenDataProvider
File
- vendor/symfony/ debug/ Tests/ Exception/ FlattenExceptionTest.php, line 107 
Class
Namespace
Symfony\Component\Debug\Tests\ExceptionCode
public function testFlattenHttpException(\Exception $exception, $statusCode) {
  $flattened = FlattenException::create($exception);
  $flattened2 = FlattenException::create($exception);
  $flattened
    ->setPrevious($flattened2);
  $this
    ->assertEquals($exception
    ->getMessage(), $flattened
    ->getMessage(), 'The message is copied from the original exception.');
  $this
    ->assertEquals($exception
    ->getCode(), $flattened
    ->getCode(), 'The code is copied from the original exception.');
  $this
    ->assertInstanceOf($flattened
    ->getClass(), $exception, 'The class is set to the class of the original exception');
}