1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00

Fixed ExceptionCodeTest provider to emit array keys

This commit is contained in:
Bruce Weirdan 2022-01-31 00:26:23 +02:00
parent a2977a5ca9
commit 0cbcd0fcf9
No known key found for this signature in database
GPG Key ID: CFC3AAB181751B0D

View File

@ -39,23 +39,23 @@ class ExceptionCodeTest extends TestCase
'assertions' => [], 'assertions' => [],
]; ];
yield 'CustomThrowable' => [ yield 'CustomThrowable' => [
'<?php 'code' => '<?php
interface CustomThrowable extends \Throwable {} interface CustomThrowable extends \Throwable {}
/** @var CustomThrowable $e */ /** @var CustomThrowable $e */
$code = $e->getCode(); $code = $e->getCode();
', ',
['$code' => 'int'], 'assertions' => ['$code' => 'int'],
]; ];
yield 'Throwable' => [ yield 'Throwable' => [
'<?php 'code' => '<?php
/** @var \Throwable $e */ /** @var \Throwable $e */
$code = $e->getCode(); $code = $e->getCode();
', ',
'assertions' => ['$code' => 'int|string'], 'assertions' => ['$code' => 'int|string'],
]; ];
yield 'Exception' => [ yield 'Exception' => [
'<?php 'code' => '<?php
/** @var \Exception $e */ /** @var \Exception $e */
$code = $e->getCode(); $code = $e->getCode();
', ',