diff --git a/src/Query/Select.php b/src/Query/Select.php index a49ba4c8..0a5d98e0 100644 --- a/src/Query/Select.php +++ b/src/Query/Select.php @@ -24,6 +24,6 @@ final class Select extends AbstractSelect */ protected function modifySelection(QueryBuilder $qb, array $selections): void { - $qb->select($selections); + $qb->select(...$selections); } } diff --git a/tests/Query/SelectSpec.php b/tests/Query/SelectSpec.php index bfa15177..200e365f 100644 --- a/tests/Query/SelectSpec.php +++ b/tests/Query/SelectSpec.php @@ -42,21 +42,21 @@ public function it_is_a_query_modifier(): void public function it_select_single_filed(QueryBuilder $qb): void { - $qb->select(['a.foo'])->shouldBeCalled()->willReturn($qb); + $qb->select('a.foo')->shouldBeCalled()->willReturn($qb); $this->modify($qb, 'a'); } public function it_select_several_fields(QueryBuilder $qb): void { $this->beConstructedWith('foo', 'bar'); - $qb->select(['b.foo', 'b.bar'])->shouldBeCalled()->willReturn($qb); + $qb->select('b.foo', 'b.bar')->shouldBeCalled()->willReturn($qb); $this->modify($qb, 'b'); } public function it_select_operand(QueryBuilder $qb): void { $this->beConstructedWith('foo', new Field('bar')); - $qb->select(['b.foo', 'b.bar'])->shouldBeCalled()->willReturn($qb); + $qb->select('b.foo', 'b.bar')->shouldBeCalled()->willReturn($qb); $this->modify($qb, 'b'); } }