Marks fork as 2.0.0.
This commit is contained in:
parent
d93a6b5c09
commit
8d8de4a2b0
81 changed files with 1921 additions and 3954 deletions
|
|
@ -1,47 +1,43 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
declare( strict_types=1 );
|
||||
|
||||
namespace Tests\Functions;
|
||||
|
||||
use DateTime;
|
||||
use Arendsen\FluxQueryBuilder\Functions\Range;
|
||||
use Hosterra\FluxBuilder\Functions\Range;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class RangeFunctionTest extends TestCase
|
||||
{
|
||||
public function testOnlyStartOption()
|
||||
{
|
||||
$expression = new Range(
|
||||
new DateTime('2022-08-12 18:00:00')
|
||||
);
|
||||
final class RangeFunctionTest extends TestCase {
|
||||
public function testOnlyStartOption() {
|
||||
$expression = new Range(
|
||||
new DateTime( '2022-08-12 18:00:00' )
|
||||
);
|
||||
|
||||
$query = '|> range(start: time(v: 2022-08-12T18:00:00Z)) ';
|
||||
$query = '|> range(start: time(v: 2022-08-12T18:00:00Z)) ';
|
||||
|
||||
$this->assertEquals($query, $expression->__toString());
|
||||
}
|
||||
$this->assertEquals( $query, $expression->__toString() );
|
||||
}
|
||||
|
||||
public function testWithStopOption()
|
||||
{
|
||||
$expression = new Range(
|
||||
new DateTime('2022-08-12 18:00:00'),
|
||||
new DateTime('2022-08-12 20:00:00')
|
||||
);
|
||||
public function testWithStopOption() {
|
||||
$expression = new Range(
|
||||
new DateTime( '2022-08-12 18:00:00' ),
|
||||
new DateTime( '2022-08-12 20:00:00' )
|
||||
);
|
||||
|
||||
$query = '|> range(start: time(v: 2022-08-12T18:00:00Z), stop: time(v: 2022-08-12T20:00:00Z)) ';
|
||||
$query = '|> range(start: time(v: 2022-08-12T18:00:00Z), stop: time(v: 2022-08-12T20:00:00Z)) ';
|
||||
|
||||
$this->assertEquals($query, $expression->__toString());
|
||||
}
|
||||
$this->assertEquals( $query, $expression->__toString() );
|
||||
}
|
||||
|
||||
public function testRangeInBetween()
|
||||
{
|
||||
$expression = new Range(
|
||||
new DateTime('2022-08-12 17:31:00'),
|
||||
new DateTime('2022-08-12 18:31:00')
|
||||
);
|
||||
public function testRangeInBetween() {
|
||||
$expression = new Range(
|
||||
new DateTime( '2022-08-12 17:31:00' ),
|
||||
new DateTime( '2022-08-12 18:31:00' )
|
||||
);
|
||||
|
||||
$expected = '|> range(start: time(v: 2022-08-12T17:31:00Z), stop: time(v: 2022-08-12T18:31:00Z)) ';
|
||||
$expected = '|> range(start: time(v: 2022-08-12T17:31:00Z), stop: time(v: 2022-08-12T18:31:00Z)) ';
|
||||
|
||||
$this->assertEquals($expected, $expression->__toString());
|
||||
}
|
||||
$this->assertEquals( $expected, $expression->__toString() );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue