Skip to content

Commit bd4b7d2

Browse files
committed
fix test
1 parent 99b2d4d commit bd4b7d2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,10 +886,21 @@ public function testBug7500(): void
886886
$this->assertNoErrors($errors);
887887
}
888888

889+
890+
/**
891+
*
892+
*/
893+
889894
public function testBug7554(): void
890895
{
891896
$errors = $this->runAnalyse(__DIR__ . '/data/bug-7554.php');
892-
$this->assertCount(0, $errors);
897+
$this->assertCount(2, $errors);
898+
899+
$this->assertSame(sprintf('Parameter #1 $%s of function count expects array|Countable, list<array<int, int<0, max>|string>>|false given.', PHP_VERSION_ID < 80000 ? 'var' : 'value'), $errors[0]->getMessage());
900+
$this->assertSame(26, $errors[0]->getLine());
901+
902+
$this->assertSame('Cannot access offset int<1, max> on list<array{string, int<0, max>}>|false.', $errors[1]->getMessage());
903+
$this->assertSame(27, $errors[1]->getLine());
893904
}
894905

895906
public function testBug7637(): void

0 commit comments

Comments
 (0)