public function FlattenExceptionTest::testToArray

@dataProvider flattenDataProvider

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Exception/FlattenExceptionTest.php, line 90

Class

FlattenExceptionTest

Namespace

Symfony\Component\HttpKernel\Tests\Exception

Code

public function testToArray(\Exception $exception, $statusCode) {
  $flattened = FlattenException::create($exception);
  $flattened
    ->setTrace(array(), 'foo.php', 123);
  $this
    ->assertEquals(array(
    array(
      'message' => 'test',
      'class' => 'Exception',
      'trace' => array(
        array(
          'namespace' => '',
          'short_class' => '',
          'class' => '',
          'type' => '',
          'function' => '',
          'file' => 'foo.php',
          'line' => 123,
          'args' => array(),
        ),
      ),
    ),
  ), $flattened
    ->toArray());
}