Skip to content

Commit

Permalink
Updating InvalidConstantAssignmentValue false positive tests to use a…
Browse files Browse the repository at this point in the history
… lower value for $codebase->config->max_shaped_array_size.
  • Loading branch information
MelechMizrachi committed Feb 26, 2024
1 parent 132fa77 commit 2c3e8ab
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tests/ConstantTest.php
Expand Up @@ -828,8 +828,8 @@ public static function foo(int $i) : void {}
'code' => '<?php
class TestInvalidConstantAssignmentValueFalsePositiveWithArray {
const LOOKUP = [
"00" => null,
"01" => null,
"00" => self::SUCCEED,
"10" => self::FAIL,
"02" => null,
"03" => null,
"04" => null,
Expand Down Expand Up @@ -941,11 +941,19 @@ public static function will_succeed(string $code) : bool {
return (self::LOOKUP[$code] ?? null) === self::SUCCEED;
}
}',
'assertions' => [],
'ignored_issues' => [],
'php_version' => '7.4',
'codebase_config' => [
'max_shaped_array_size' => 50,
],
],
'tooLongArrayInvalidConstantAssignmentValueFalsePositiveWithList' => [
'code' => '<?php
class TestInvalidConstantAssignmentValueFalsePositiveWithList {
const LOOKUP = [
self::SUCCEED,
self::FAIL,
null,
null,
null,
Expand Down Expand Up @@ -1059,6 +1067,12 @@ public static function will_succeed(int $code) : bool {
return (self::LOOKUP[$code] ?? null) === self::SUCCEED;
}
}',
'assertions' => [],
'ignored_issues' => [],
'php_version' => '7.4',
'codebase_config' => [
'max_shaped_array_size' => 50,
],
],
'valueOf' => [
'code' => '<?php
Expand Down

0 comments on commit 2c3e8ab

Please sign in to comment.