Add addLast() function

This commit is contained in:
David Arendsen 2023-02-10 11:40:35 +01:00
commit 3d32bdb45d
6 changed files with 100 additions and 0 deletions

View file

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