Add addUnique function
Signed-off-by: David Arendsen <darendsen@gamepoint.com>
This commit is contained in:
parent
fc99922700
commit
483e67a2e8
6 changed files with 110 additions and 0 deletions
29
tests/Functions/UniqueFunctionTest.php
Normal file
29
tests/Functions/UniqueFunctionTest.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Functions;
|
||||
|
||||
use Arendsen\FluxQueryBuilder\Functions\Unique;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class UniqueunctionTest extends TestCase
|
||||
{
|
||||
public function testSimpleUnique()
|
||||
{
|
||||
$expression = new Unique();
|
||||
|
||||
$query = '|> unique() ';
|
||||
|
||||
$this->assertEquals($query, $expression->__toString());
|
||||
}
|
||||
|
||||
public function testUniqueWithColumn()
|
||||
{
|
||||
$expression = new Unique('something');
|
||||
|
||||
$query = '|> unique(column: "something") ';
|
||||
|
||||
$this->assertEquals($query, $expression->__toString());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue