Add addLast() function
This commit is contained in:
parent
2257e4f9cd
commit
3d32bdb45d
6 changed files with 100 additions and 0 deletions
29
tests/Functions/LastFunctionTest.php
Normal file
29
tests/Functions/LastFunctionTest.php
Normal 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());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue