class ErrorResponseFactoryTest extends TestCase
{ /**
* @dataProvider getResponseFromExceptionProvider
*/
public function testStackTraceForExceptionInDebugMode(\Exception
$exception): void
{ $factory =
new ErrorResponseFactory();
/* @var JsonResponse $response */
$response =
$factory->
getResponseFromException($exception, true
);
$data = null;
if ($response->
getContent()) { $data =
json_decode($response->
getContent(), true, 512, \JSON_THROW_ON_ERROR
);
} $errors =
$data['errors'
];
static::
assertCount(1,
$errors);