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:
parent
a2977a5ca9
commit
0cbcd0fcf9
@ -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();
|
||||||
',
|
',
|
||||||
|
Loading…
Reference in New Issue
Block a user