Skip to content

Commit 076e8b6

Browse files
committed
fix merge
1 parent 7b0a3b3 commit 076e8b6

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Tests/Middleware/Debug/MiddlewareTest.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,21 +157,19 @@ public function testWithParamBound(callable $executeMethod)
157157

158158
$expectedRes = $res = $this->getResourceFromString('mydata');
159159

160-
$stmt->bindValue(2, $price);
161-
$stmt->bindValue(3, $stock, ParameterType::INTEGER);
160+
$stmt = $this->conn->prepare($sql);
161+
$stmt->bindValue(1, 'product1');
162+
$stmt->bindValue(2, '12.5');
163+
$stmt->bindValue(3, 5, ParameterType::INTEGER);
162164
$stmt->bindValue(4, $res, ParameterType::BINARY);
163165

164-
$product = 'product1';
165-
$price = '12.5';
166-
$stock = 5;
167-
168166
$executeMethod($stmt);
169167

170168
// Debug data should not be affected by these changes
171169
$debug = $this->debugDataHolder->getData()['default'] ?? [];
172170
$this->assertCount(2, $debug);
173171
$this->assertSame($sql, $debug[1]['sql']);
174-
$this->assertSame(['product1', 12.5, 5, $expectedRes], $debug[1]['params']);
172+
$this->assertSame(['product1', '12.5', 5, $expectedRes], $debug[1]['params']);
175173
$this->assertSame([ParameterType::STRING, ParameterType::STRING, ParameterType::INTEGER, ParameterType::BINARY], $debug[1]['types']);
176174
$this->assertGreaterThan(0, $debug[1]['executionMS']);
177175
}

0 commit comments

Comments
 (0)