flux-querybuilder/tests/Functions/MaxFunctionTest.php

26 lines
524 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\Max;
use PHPUnit\Framework\TestCase;
2024-03-30 16:44:38 +01:00
final class MaxFunctionTest extends TestCase {
public function testSimpleMax() {
$expression = new Max();
2024-03-30 16:44:38 +01:00
$query = '|> max() ';
2024-03-30 16:44:38 +01:00
$this->assertEquals( $query, $expression->__toString() );
}
2024-03-30 16:44:38 +01:00
public function testMaxWithColumn() {
$expression = new Max( 'something' );
2024-03-30 16:44:38 +01:00
$query = '|> max(column: "something") ';
2024-03-30 16:44:38 +01:00
$this->assertEquals( $query, $expression->__toString() );
}
}