flux-querybuilder/tests/Functions/DuplicateFunctionTest.php

18 lines
412 B
PHP
Raw Permalink Normal View History

<?php
2024-03-30 16:44:38 +01:00
declare( strict_types=1 );
namespace Tests\Functions;
2024-03-30 16:44:38 +01:00
use Hosterra\FluxBuilder\Functions\Duplicate;
use PHPUnit\Framework\TestCase;
2024-03-30 16:44:38 +01:00
final class DuplicateFunctionTest extends TestCase {
public function testSimpleDuplicate() {
$expression = new Duplicate( 'tag', 'tag_dup' );
2024-03-30 16:44:38 +01:00
$query = '|> duplicate(column: "tag", as: "tag_dup") ';
2024-03-30 16:44:38 +01:00
$this->assertEquals( $query, $expression->__toString() );
}
}