Add addCount, addFirst, addMax, and addMin functions

Signed-off-by: David Arendsen <darendsen@gamepoint.com>
This commit is contained in:
David Arendsen 2023-02-12 17:18:23 +01:00
commit fc99922700
15 changed files with 463 additions and 23 deletions

View file

@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Tests\Functions;
use Arendsen\FluxQueryBuilder\Functions\Count;
use PHPUnit\Framework\TestCase;
final class CountFunctionTest extends TestCase
{
public function testSimpleCount()
{
$expression = new Count();
$query = '|> count() ';
$this->assertEquals($query, $expression->__toString());
}
public function testCountWithColumn()
{
$expression = new Count('_value');
$query = '|> count(column: "_value") ';
$this->assertEquals($query, $expression->__toString());
}
}