Add sum() Flux function + docs
Signed-off-by: davidarendsen <davidarendsen@hey.com>
This commit is contained in:
parent
ee0ae4ca20
commit
2257e4f9cd
6 changed files with 108 additions and 0 deletions
20
tests/Functions/SumFunctionTest.php
Normal file
20
tests/Functions/SumFunctionTest.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Functions;
|
||||
|
||||
use Arendsen\FluxQueryBuilder\Functions\Sum;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class SumFunctionTest extends TestCase
|
||||
{
|
||||
public function testSimpleSum()
|
||||
{
|
||||
$expression = new Sum('_value');
|
||||
|
||||
$query = '|> sum(column: "_value") ';
|
||||
|
||||
$this->assertEquals($query, $expression->__toString());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue