Skip to content

Commit

Permalink
Update test according to main PR (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov authored Apr 27, 2024
1 parent 4fadbec commit 2b187cc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions tests/Provider/QueryBuilderProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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[]',
[],
],
Expand Down
7 changes: 5 additions & 2 deletions tests/Provider/SchemaProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b187cc

Please sign in to comment.