You are here

public function FlattenExceptionTest::testToArray in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php \Symfony\Component\Debug\Tests\Exception\FlattenExceptionTest::testToArray()

@dataProvider flattenDataProvider

File

vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php, line 155

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());
}