Skip to content

Commit

Permalink
test case-insensitive constant resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed May 13, 2024
1 parent bebe454 commit aff567e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/PHPStan/Analyser/data/case-insensitive-parent.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use function PHPStan\Testing\assertType;

class A {
const myConst = '1';

public function doFoo():string {
return "hello";
}
Expand All @@ -16,6 +18,9 @@ public function doFoo():string {
assertType('string', PARENT::doFoo());
assertType('string', parent::doFoo());

assertType("'1'", PARENT::myConst);
assertType("'1'", parent::myConst);

assertType("'CaseInsensitiveParent\\\\A'", PARENT::class);

return PARENT::doFoo();
Expand Down

0 comments on commit aff567e

Please sign in to comment.