diff --git a/tests/CommandTest.php b/tests/CommandTest.php index c59a5b30..960d6aa7 100644 --- a/tests/CommandTest.php +++ b/tests/CommandTest.php @@ -57,7 +57,7 @@ public function testAddDefaultValue(): void public function testBatchInsert( string $table, array $columns, - array $values, + iterable $values, string $expected, array $expectedParams = [], int $insertedRow = 1 diff --git a/tests/Provider/QueryBuilderProvider.php b/tests/Provider/QueryBuilderProvider.php index 65302f5a..aa5c5e8c 100644 --- a/tests/Provider/QueryBuilderProvider.php +++ b/tests/Provider/QueryBuilderProvider.php @@ -74,11 +74,13 @@ public static function buildCondition(): array /* array condition corner cases */ [['@>', 'id', new ArrayExpression([1])], '"id" @> ARRAY[:qp0]', [':qp0' => 1]], - 'scalar can not be converted to array #1' => [['@>', 'id', new ArrayExpression(1)], '"id" @> ARRAY[]', []], - [ - 'scalar can not be converted to array #2' => [ - '@>', 'id', new ArrayExpression(false), - ], + 'scalar can not be converted to array #1' => [ + ['@>', 'id', new ArrayExpression(1)], + '"id" @> ARRAY[]', + [], + ], + 'scalar can not be converted to array #2' => [ + ['@>', 'id', new ArrayExpression(false)], '"id" @> ARRAY[]', [], ], diff --git a/tests/Provider/SchemaProvider.php b/tests/Provider/SchemaProvider.php index d9aec4b5..bce88531 100644 --- a/tests/Provider/SchemaProvider.php +++ b/tests/Provider/SchemaProvider.php @@ -451,11 +451,14 @@ public static function constraintsOfView(): array { $constraints = self::constraints(); + $result = []; + foreach ($constraints as $key => $constraint) { - $constraints[$key][0] = $constraint[0] . '_view'; + $result['view ' . $key] = $constraint; + $result['view ' . $key][0] = $constraint[0] . '_view'; } - return $constraints; + return $result; } public static function tableSchemaCacheWithTablePrefixes(): array