mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +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' => [],
|
||||
];
|
||||
yield 'CustomThrowable' => [
|
||||
'<?php
|
||||
'code' => '<?php
|
||||
interface CustomThrowable extends \Throwable {}
|
||||
|
||||
/** @var CustomThrowable $e */
|
||||
$code = $e->getCode();
|
||||
',
|
||||
['$code' => 'int'],
|
||||
'assertions' => ['$code' => 'int'],
|
||||
];
|
||||
yield 'Throwable' => [
|
||||
'<?php
|
||||
'code' => '<?php
|
||||
/** @var \Throwable $e */
|
||||
$code = $e->getCode();
|
||||
',
|
||||
'assertions' => ['$code' => 'int|string'],
|
||||
];
|
||||
yield 'Exception' => [
|
||||
'<?php
|
||||
'code' => '<?php
|
||||
/** @var \Exception $e */
|
||||
$code = $e->getCode();
|
||||
',
|
||||
|
Loading…
Reference in New Issue
Block a user