Skip to content

Commit fd94ce4

Browse files
committed
test maybe true/false ConstFetch
1 parent 4d6fe4e commit fd94ce4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/Rules/PHPUnit/data/assert-same-boolean-expected.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,18 @@ public function testMaybeTrueFalse(): void
8383
\PHPUnit\Framework\Assert::assertSame($a, 'foo');
8484
}
8585

86+
public function testConstMaybeTrueFalse(): void
87+
{
88+
if (
89+
!defined('MY_TEST_CONST')
90+
) {
91+
return;
92+
}
93+
if (MY_TEST_CONST !== true && MY_TEST_CONST !== false) {
94+
return;
95+
}
96+
\PHPUnit\Framework\Assert::assertSame(MY_TEST_CONST, 'foo');
97+
}
8698
}
8799

88100
const PHPSTAN_PHPUNIT_TRUE = true;

0 commit comments

Comments
 (0)