public function FlattenExceptionTest::testToArray 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::testToArray()
@dataProvider flattenDataProvider
File
- vendor/
symfony/ debug/ Tests/ Exception/ FlattenExceptionTest.php, line 155
Class
Namespace
Symfony\Component\Debug\Tests\ExceptionCode
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());
}