@@ -147,12 +147,14 @@ public function testExecuteWithArguments() {
147
147
$ this ->assertCount (1 , $ statement );
148
148
$ result = $ statement ->fetch ();
149
149
$ this ->assertEquals ([2 ], $ result );
150
+ $ result ->closeCursor ();
150
151
151
152
$ sql = 'SELECT 1 + ? + ? AS total ' ;
152
153
$ statement = $ this ->connection ->execute ($ sql , [2 , 3 ], array ('integer ' , 'integer ' ));
153
154
$ this ->assertCount (1 , $ statement );
154
155
$ result = $ statement ->fetch ('assoc ' );
155
156
$ this ->assertEquals (['total ' => 6 ], $ result );
157
+ $ result ->closeCursor ();
156
158
157
159
$ sql = 'SELECT 1 + :one + :two AS total ' ;
158
160
$ statement = $ this ->connection ->execute ($ sql , ['one ' => 2 , 'two ' => 3 ], array ('one ' => 'integer ' , 'two ' => 'integer ' ));
@@ -171,6 +173,7 @@ public function testExecuteWithArgumentsAndTypes() {
171
173
$ sql = "SELECT ? = '2012-01-01' " ;
172
174
$ statement = $ this ->connection ->execute ($ sql , [new \DateTime ('2012-01-01 ' )], ['date ' ]);
173
175
$ result = $ statement ->fetch ();
176
+ $ result ->closeCursor ();
174
177
$ this ->assertTrue ((bool )$ result [0 ]);
175
178
176
179
$ sql = "SELECT ? = '2012-01-01', ? = '2000-01-01 10:10:10', ? = 2 " ;
0 commit comments