Skip to content

Commit b69144e

Browse files
committed
Fix tests
1 parent a2f59f2 commit b69144e

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

src/Debug/CommandInterfaceProxy.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,14 @@ public function createView(string $viewName, QueryInterface|string $subQuery): s
177177
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
178178
}
179179

180+
/**
181+
* @psalm-suppress MixedArgument
182+
*/
183+
public function dbTypecasting(bool $dbTypecasting = true): static
184+
{
185+
return new self($this->decorated->{__FUNCTION__}(...func_get_args()), $this->collector);
186+
}
187+
180188
/**
181189
* @psalm-suppress MixedArgument
182190
*/

tests/Common/CommonCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ public function testInsertWithoutTypecasting(): void
15241524
':qp0' => 1,
15251525
':qp1' => 'test',
15261526
':qp2' => 3.14,
1527-
':qp3' => true,
1527+
':qp3' => $db->getDriverName() === 'oci' ? '1' : true,
15281528
], $command->getParams());
15291529

15301530
$command->dbTypecasting(false)->insert('{{type}}', $values);
@@ -1557,7 +1557,7 @@ public function testInsertBatchWithoutTypecasting(): void
15571557
':qp0' => 1,
15581558
':qp1' => 'test',
15591559
':qp2' => 3.14,
1560-
':qp3' => true,
1560+
':qp3' => $db->getDriverName() === 'oci' ? '1' : true,
15611561
], $command->getParams());
15621562

15631563
$command->dbTypecasting(false)->insertBatch('{{type}}', [$values]);
@@ -2069,7 +2069,7 @@ public function testUpdateWithoutTypecasting(): void
20692069
':qp0' => 1,
20702070
':qp1' => 'test',
20712071
':qp2' => 3.14,
2072-
':qp3' => true,
2072+
':qp3' => $db->getDriverName() === 'oci' ? '1' : true,
20732073
], $command->getParams());
20742074

20752075
$command->dbTypecasting(false)->update('{{type}}', $values);

tests/Common/CommonQueryBuilderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function testInsertWithoutTypecasting(): void
8989
':qp0' => 1,
9090
':qp1' => 'test',
9191
':qp2' => 3.14,
92-
':qp3' => true,
92+
':qp3' => $db->getDriverName() === 'oci' ? '1' : true,
9393
], $params);
9494

9595
$params = [];
@@ -124,7 +124,7 @@ public function testInsertBatchWithoutTypecasting(): void
124124
':qp0' => 1,
125125
':qp1' => 'test',
126126
':qp2' => 3.14,
127-
':qp3' => true,
127+
':qp3' => $db->getDriverName() === 'oci' ? '1' : true,
128128
], $params);
129129

130130
$params = [];
@@ -159,7 +159,7 @@ public function testUpdateWithoutTypecasting(): void
159159
':qp0' => 1,
160160
':qp1' => 'test',
161161
':qp2' => 3.14,
162-
':qp3' => true,
162+
':qp3' => $db->getDriverName() === 'oci' ? '1' : true,
163163
], $params);
164164

165165
$params = [];

0 commit comments

Comments
 (0)