Skip to content

Commit

Permalink
Merge pull request #7538 from weirdan/fix-exceptioncodetest-provider-…
Browse files Browse the repository at this point in the history
…shape
  • Loading branch information
weirdan committed Jan 30, 2022
2 parents a2977a5 + 0cbcd0f commit 421ae3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/ReturnTypeProvider/ExceptionCodeTest.php
Expand Up @@ -39,23 +39,23 @@ function f(\PDOException $e): string {
'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();
',
Expand Down

0 comments on commit 421ae3b

Please sign in to comment.