Skip to content

Commit

Permalink
Add test for fixes issues persisting
Browse files Browse the repository at this point in the history
  • Loading branch information
aunzat committed Oct 30, 2024
1 parent 0f796f1 commit 52d760c
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions tests/Cache/CacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,5 +307,51 @@ public function bar(): string
],
],
];
yield 'deletedLines' => [
[
[
'files' => [
'src/A.php' => <<<'PHP'
<?php
class A {
public function foo(): int
{
//
//
return 'a';
}
public function bar(): void
{
}
}
PHP,
],
'issues' => [
'src/A.php' => [
'InvalidReturnStatement: The inferred type \'\'a\'\' does not match the declared return type \'int\' for A::foo',
'InvalidReturnType: The declared return type \'int\' for A::foo is incorrect, got \'\'a\'\'',
],
],
],
[
'files' => [
'src/A.php' => <<<'PHP'
<?php
class A
{
public function foo(): int
{
return 1;
}
public function bar(): void
{
}
}
PHP,
],
'issues' => [],
],
],
];
}
}

0 comments on commit 52d760c

Please sign in to comment.