1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Failing test

This commit is contained in:
Vincent Langlet 2022-01-30 15:17:18 +01:00
parent b45306c8a5
commit 584344fda3

View File

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