@@ -281,15 +281,21 @@ public function testQueryStringResolvesWithResultWithTypeStringAndRunsUntilQuit(
281281
282282 public function provideSqlDataWillBeReturnedWithType ()
283283 {
284- return [
285- ['42 ' , 42 ],
286- ['1.5 ' , 1.5 ],
287- ['null ' , null ],
288- ['"hello" ' , 'hello ' ],
289- ['"hellö" ' , 'hellö ' ],
290- ['true ' , 1 ],
291- ['false ' , 0 ],
292- ];
284+ return array_merge (
285+ [
286+ ['42 ' , 42 ],
287+ ['1.5 ' , 1.5 ],
288+ ['null ' , null ],
289+ ['"hello" ' , 'hello ' ],
290+ ['"hellö" ' , 'hellö ' ]
291+ ],
292+ (SQLite3::version ()['versionNumber ' ] < 3023000 ) ? [] : [
293+ // boolean identifiers exist only as of SQLite 3.23.0 (2018-04-02)
294+ // @link https://www.sqlite.org/lang_expr.html#booleanexpr
295+ ['true ' , 1 ],
296+ ['false ' , 0 ]
297+ ]
298+ );
293299 }
294300
295301 /**
@@ -308,7 +314,7 @@ public function testQueryValueInStatementResolvesWithResultWithTypeAndRunsUntilQ
308314 $ promise ->then (function (DatabaseInterface $ db ) use (&$ data , $ value ){
309315 $ db ->query ('SELECT ' . $ value . ' AS value ' )->then (function (Result $ result ) use (&$ data ) {
310316 $ data = $ result ->rows ;
311- });
317+ }, ' printf ' );
312318
313319 $ db ->quit ();
314320 });
@@ -323,6 +329,7 @@ public function provideDataWillBeReturnedWithType()
323329 return [
324330 [0 ],
325331 [1 ],
332+ [42 ],
326333 [1.5 ],
327334 [null ],
328335 ['hello ' ],
@@ -345,7 +352,7 @@ public function testQueryValuePlaceholderPositionalResolvesWithResultWithExactTy
345352 $ promise ->then (function (DatabaseInterface $ db ) use (&$ data , $ value ){
346353 $ db ->query ('SELECT ? AS value ' , array ($ value ))->then (function (Result $ result ) use (&$ data ) {
347354 $ data = $ result ->rows ;
348- });
355+ }, ' printf ' );
349356
350357 $ db ->quit ();
351358 });
@@ -370,7 +377,7 @@ public function testQueryValuePlaceholderNamedResolvesWithResultWithExactTypeAnd
370377 $ promise ->then (function (DatabaseInterface $ db ) use (&$ data , $ value ){
371378 $ db ->query ('SELECT :value AS value ' , array ('value ' => $ value ))->then (function (Result $ result ) use (&$ data ) {
372379 $ data = $ result ->rows ;
373- });
380+ }, ' printf ' );
374381
375382 $ db ->quit ();
376383 });
@@ -385,7 +392,7 @@ public function provideDataWillBeReturnedWithOtherType()
385392 return [
386393 'true ' => [true , 1 ],
387394 'false ' => [false , 0 ],
388- 'float without fraction is int ' => [1 .0 , 1 ]
395+ 'float without fraction is int ' => [2 .0 , 2 ]
389396 ];
390397 }
391398
0 commit comments