Add Flux from() and filter() methods
Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
parent
af750eb635
commit
e0e69b4beb
17 changed files with 2095 additions and 0 deletions
38
tests/Expression/FromExpressionTest.php
Normal file
38
tests/Expression/FromExpressionTest.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Arendsen\FluxQueryBuilder\Function\From;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class FromExpressionTest extends TestCase {
|
||||
|
||||
/**
|
||||
* @dataProvider somethingProvider
|
||||
*/
|
||||
public function testSomething($settings, $query)
|
||||
{
|
||||
$expression = new From($settings);
|
||||
|
||||
$this->assertEquals($expression->__toString(), $query);
|
||||
}
|
||||
|
||||
public function somethingProvider(): array
|
||||
{
|
||||
return [
|
||||
'from bucket' => [
|
||||
[
|
||||
'bucket' => 'test-bucket',
|
||||
],
|
||||
'from(bucket: "test-bucket") '
|
||||
],
|
||||
'from bucket and host' => [
|
||||
[
|
||||
'bucket' => 'test-bucket',
|
||||
'host' => 'test',
|
||||
],
|
||||
'from(bucket: "test-bucket", host: "test") '
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue