@@ -157,21 +157,19 @@ public function testWithParamBound(callable $executeMethod)
157
157
158
158
$ expectedRes = $ res = $ this ->getResourceFromString ('mydata ' );
159
159
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 );
162
164
$ stmt ->bindValue (4 , $ res , ParameterType::BINARY );
163
165
164
- $ product = 'product1 ' ;
165
- $ price = '12.5 ' ;
166
- $ stock = 5 ;
167
-
168
166
$ executeMethod ($ stmt );
169
167
170
168
// Debug data should not be affected by these changes
171
169
$ debug = $ this ->debugDataHolder ->getData ()['default ' ] ?? [];
172
170
$ this ->assertCount (2 , $ debug );
173
171
$ 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 ' ]);
175
173
$ this ->assertSame ([ParameterType::STRING , ParameterType::STRING , ParameterType::INTEGER , ParameterType::BINARY ], $ debug [1 ]['types ' ]);
176
174
$ this ->assertGreaterThan (0 , $ debug [1 ]['executionMS ' ]);
177
175
}
0 commit comments