flux-querybuilder/tests/Functions/MapFunctionTest.php
davidarendsen 39ae737fa1 Fix coding style with phpcs PSR-12 standard
Signed-off-by: davidarendsen <davidarendsen@hey.com>
2022-08-15 20:28:25 +00:00

20 lines
422 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Functions;
use Arendsen\FluxQueryBuilder\Functions\Map;
use PHPUnit\Framework\TestCase;
final class MapFunctionTest extends TestCase
{
public function testSimpleMap()
{
$expression = new Map('r with name: r.user');
$query = '|> map(fn: (r) => ({ r with name: r.user })) ';
$this->assertEquals($query, $expression->__toString());
}
}