Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Jul 14, 2024
1 parent 7c9f571 commit 28c575c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion proofs/query/where.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static function($assert, $column1, $column2, $value) {
$where = Where::of($lessThan->or($equal));

$assert->same(
"WHERE ({$column1->name()->sql(Driver::mysql)} < ? OR {{$column2->name()->sql(Driver::mysql)} = ?})",
"WHERE ({$column1->name()->sql(Driver::mysql)} < ? OR {$column2->name()->sql(Driver::mysql)} = ?)",
$where->sql(Driver::mysql),
);
$assert->count(2, $where->parameters());
Expand Down
2 changes: 2 additions & 0 deletions src/Query/Where.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ private function findParamaters(
$specification->left()->sign() === Sign::moreThan &&
$specification->right() instanceof Comparator &&
$specification->right()->sign() === Sign::equality &&
$specification->left()->property() === $specification->right()->property() &&
$specification->left()->value() === $specification->right()->value()
) {
return $this->findComparatorParameters(
Expand All @@ -265,6 +266,7 @@ private function findParamaters(
$specification->left()->sign() === Sign::lessThan &&
$specification->right() instanceof Comparator &&
$specification->right()->sign() === Sign::equality &&
$specification->left()->property() === $specification->right()->property() &&
$specification->left()->value() === $specification->right()->value()
) {
return $this->findComparatorParameters(
Expand Down

0 comments on commit 28c575c

Please sign in to comment.