flux-querybuilder/tests/Functions/LastFunctionTest.php

29 lines
546 B
PHP
Raw Normal View History

2023-02-10 11:40:35 +01:00
<?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());
}
}