Skip to content

Commit

Permalink
set timezone to circumvent helper bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wickedOne committed Jul 14, 2020
1 parent e6a91ec commit a87dc71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/Builder/Select/SelectQueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function testEquals(): void
$this->assertSame('foo:"bar"', $this->visitor->dispatch($filter->getExpressions()[0]));

$filter = FilterBuilder::create()
->where(FilterBuilder::expr()->eq('foo', date_create('2020-01-01')));
->where(FilterBuilder::expr()->eq('foo', date_create('2020-01-01', new \DateTimeZone('UTC'))));

$this->assertSame('foo:[2020-01-01T00:00:00Z TO 2020-01-01T00:00:00Z]', $this->visitor->dispatch($filter->getExpressions()[0]));
}
Expand Down Expand Up @@ -75,7 +75,7 @@ public function testDoesNotEqual(): void
$this->assertSame('-foo:"bar"', $this->visitor->dispatch($filter->getExpressions()[0]));

$filter = FilterBuilder::create()
->where(FilterBuilder::expr()->neq('foo', date_create('2020-01-01')));
->where(FilterBuilder::expr()->neq('foo', date_create('2020-01-01', new \DateTimeZone('UTC'))));

$this->assertSame('-foo:[2020-01-01T00:00:00Z TO 2020-01-01T00:00:00Z]', $this->visitor->dispatch($filter->getExpressions()[0]));
}
Expand Down

0 comments on commit a87dc71

Please sign in to comment.