Marks fork as 2.0.0.

This commit is contained in:
Pierre Lannoy 2024-03-30 16:44:38 +01:00
commit 8d8de4a2b0
Signed by: Pierre Lannoy
GPG key ID: D27231EF87D53F31
81 changed files with 1921 additions and 3954 deletions

View file

@ -1,38 +1,35 @@
<?php
declare(strict_types=1);
declare( strict_types=1 );
namespace Tests\Functions;
use Arendsen\FluxQueryBuilder\Functions\Window;
use Hosterra\FluxBuilder\Functions\Window;
use PHPUnit\Framework\TestCase;
final class WindowFunctionTest extends TestCase
{
public function testSimpleWindow()
{
$expression = new Window('20s');
final class WindowFunctionTest extends TestCase {
public function testSimpleWindow() {
$expression = new Window( '20s' );
$query = '|> window(every: 20s) ';
$query = '|> window(every: 20s) ';
$this->assertEquals($query, $expression->__toString());
}
$this->assertEquals( $query, $expression->__toString() );
}
public function testAllParameters()
{
$expression = new Window('20s', [
'period' => 'every',
'offset' => '0s',
'location' => 'location',
'timeColumn' => '_time',
'startColumn' => '_start',
'stopColumn' => '_stop',
'createEmpty' => true
]);
public function testAllParameters() {
$expression = new Window( '20s', [
'period' => 'every',
'offset' => '0s',
'location' => 'location',
'timeColumn' => '_time',
'startColumn' => '_start',
'stopColumn' => '_stop',
'createEmpty' => true
] );
$query = '|> window(every: 20s, period: every, offset: 0s, location: "location", ' .
'timeColumn: "_time", startColumn: "_start", stopColumn: "_stop", createEmpty: true) ';
$query = '|> window(every: 20s, period: every, offset: 0s, location: "location", ' .
'timeColumn: "_time", startColumn: "_start", stopColumn: "_stop", createEmpty: true) ';
$this->assertEquals($query, $expression->__toString());
}
$this->assertEquals( $query, $expression->__toString() );
}
}