Skip to content

Commit 34b8691

Browse files
committed
fix tests
1 parent f6346f2 commit 34b8691

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

tests/PHPStan/Analyser/nsrt/bug-6799.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ protected function listingAddWhereFilterAtable(array $filterValues, array &$wher
3333
call_user_func_array(array($this, 'listingAddWhereFilterAtableDefault'), array(&$whereFilter, 'xxxx', $filters[$type], $value));
3434
}
3535
assertType('mixed', $whereFilter);
36+
if (count($whereFilter) > 0) {
37+
$where[] = "(" . implode(" AND ", $whereFilter) . ")";
38+
}
3639
}
3740
}
3841
}

tests/PHPStan/Analyser/nsrt/bug-6799b.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php declare(strict_types = 1);
22

3+
namespace Bug6799;
4+
35
use function PHPStan\Testing\assertType;
46

57
class HelloWorld

tests/PHPStan/Rules/Comparison/NumberComparisonOperatorsConstantConditionRuleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,4 +298,9 @@ public function testBug12163(): void
298298
]);
299299
}
300300

301+
public function testBug6799(): void
302+
{
303+
$this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-6799.php'], []);
304+
}
305+
301306
}

0 commit comments

Comments
 (0)