Skip to content

Commit ba5894d

Browse files
committed
fix tests
1 parent 4c7a66a commit ba5894d

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
@@ -288,4 +288,9 @@ public function testBug13874(): void
288288
$this->analyse([__DIR__ . '/data/bug-13874.php'], []);
289289
}
290290

291+
public function testBug6799(): void
292+
{
293+
$this->analyse([__DIR__ . '/../../Analyser/nsrt/bug-6799.php'], []);
294+
}
295+
291296
}

0 commit comments

Comments
 (0)