. */ declare(strict_types=1); namespace App\Tests\Doctrine\Functions; use App\Doctrine\Functions\ArrayPosition; use Doctrine\DBAL\Platforms\PostgreSQLPlatform; final class ArrayPositionTest extends AbstractDoctrineFunctionTestCase { public function testArrayPositionBuildsSql(): void { $function = new ArrayPosition('ARRAY_POSITION'); $this->setObjectProperty($function, 'array', $this->createNode(':ids')); $this->setObjectProperty($function, 'field', $this->createNode('p.id')); $sql = $function->getSql($this->createSqlWalker(new PostgreSQLPlatform())); $this->assertSame('ARRAY_POSITION(:ids, p.id)', $sql); } }