. */ declare(strict_types=1); namespace App\Tests\Doctrine\Functions; use App\Doctrine\Functions\Field2; use Doctrine\DBAL\Platforms\MySQLPlatform; final class Field2Test extends AbstractDoctrineFunctionTestCase { public function testField2BuildsSql(): void { $function = new Field2('FIELD2'); $this->setObjectProperty($function, 'field', $this->createNode('p.id')); $this->setObjectProperty($function, 'values', [ $this->createNode('1'), $this->createNode('2'), $this->createNode('3'), ]); $sql = $function->getSql($this->createSqlWalker(new MySQLPlatform())); $this->assertSame('FIELD2(p.id, 1, 2, 3)', $sql); } }