public function FlattenExceptionTest::testToArray

@dataProvider flattenDataProvider

File

drupal/core/vendor/symfony/debug/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php, line 156

Class

FlattenExceptionTest

Namespace

Symfony\Component\Debug\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());
}