Skip to content

Commit acfb3c0

Browse files
committed
Update AnalyserIntegrationTest.php
1 parent bb13df9 commit acfb3c0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,13 @@ public function testBug4715(): void
440440
public function testBug4734(): void
441441
{
442442
$errors = $this->runAnalyse(__DIR__ . '/data/bug-4734.php');
443-
$this->assertCount(3, $errors);
443+
$this->assertCount(5, $errors); // could be 3
444444

445-
$this->assertSame('Unsafe access to private property Bug4734\Foo::$httpMethodParameterOverride through static::.', $errors[0]->getMessage());
446-
$this->assertSame('Access to an undefined static property static(Bug4734\Foo)::$httpMethodParameterOverride3.', $errors[1]->getMessage());
447-
$this->assertSame('Access to an undefined property Bug4734\Foo::$httpMethodParameterOverride4.', $errors[2]->getMessage());
445+
$this->assertSame('Static property Bug4734\Foo::$httpMethodParameterOverride (bool) is never assigned false so it can be removed from the property type.', $errors[0]->getMessage()); // should not error
446+
$this->assertSame('Property Bug4734\Foo::$httpMethodParameterOverride2 (bool) is never assigned false so it can be removed from the property type.', $errors[1]->getMessage()); // should not error
447+
$this->assertSame('Unsafe access to private property Bug4734\Foo::$httpMethodParameterOverride through static::.', $errors[2]->getMessage());
448+
$this->assertSame('Access to an undefined static property static(Bug4734\Foo)::$httpMethodParameterOverride3.', $errors[3]->getMessage());
449+
$this->assertSame('Access to an undefined property Bug4734\Foo::$httpMethodParameterOverride4.', $errors[4]->getMessage());
448450
}
449451

450452
public function testBug5231(): void

0 commit comments

Comments
 (0)