@@ -213,7 +213,7 @@ public function testSelectCached():void{
213
213
214
214
$ r = $ this ->db ->select ->from ([$ this ::TABLE ])->cached (2 );
215
215
$ getCacheKey = $ this ->getMethod ('cacheKey ' );
216
- $ cacheKey = $ getCacheKey ->invokeArgs ($ this ->db , [$ r ->sql (), [], 'hash ' ]);
216
+ $ cacheKey = $ getCacheKey ->invokeArgs ($ this ->db , [$ r ->getSQL (), [], 'hash ' ]);
217
217
218
218
// uncached
219
219
$ this ::assertFalse ($ this ->cache ->has ($ cacheKey ));
@@ -228,22 +228,22 @@ public function testSelectCached():void{
228
228
229
229
// raw uncached
230
230
$ this ::assertFalse ($ this ->cache ->has ($ cacheKey ));
231
- $ this ->db ->rawCached ($ r ->sql (), 'hash ' , true , 1 );
231
+ $ this ->db ->rawCached ($ r ->getSQL (), 'hash ' , true , 1 );
232
232
233
233
// cached
234
234
$ this ::assertTrue ($ this ->cache ->has ($ cacheKey ));
235
- $ this ->db ->rawCached ($ r ->sql (), 'hash ' , true , 1 );
235
+ $ this ->db ->rawCached ($ r ->getSQL (), 'hash ' , true , 1 );
236
236
237
237
sleep (2 );
238
238
# $this->cache->clear();
239
239
240
240
// prepared uncached
241
241
$ this ::assertFalse ($ this ->cache ->has ($ cacheKey ));
242
- $ this ->db ->preparedCached ($ r ->sql (), [], 'hash ' , true , 1 );
242
+ $ this ->db ->preparedCached ($ r ->getSQL (), [], 'hash ' , true , 1 );
243
243
244
244
// cached
245
245
$ this ::assertTrue ($ this ->cache ->has ($ cacheKey ));
246
- $ this ->db ->preparedCached ($ r ->sql (), [], 'hash ' , true , 1 );
246
+ $ this ->db ->preparedCached ($ r ->getSQL (), [], 'hash ' , true , 1 );
247
247
}
248
248
249
249
public function testShowDatabases ():void {
@@ -294,70 +294,70 @@ public function testCreateDatabaseNoNameException():void{
294
294
$ this ->expectException (QueryException::class);
295
295
$ this ->expectExceptionMessage ('no name specified ' );
296
296
297
- $ this ->db ->create ->database ('' )->sql ();
297
+ $ this ->db ->create ->database ('' )->getSQL ();
298
298
}
299
299
300
300
public function testCreateTableNoNameException ():void {
301
301
$ this ->expectException (QueryException::class);
302
302
$ this ->expectExceptionMessage ('no name specified ' );
303
303
304
- $ this ->db ->create ->table ('' )->sql ();
304
+ $ this ->db ->create ->table ('' )->getSQL ();
305
305
}
306
306
307
307
public function testDropDatabaseNoNameException ():void {
308
308
$ this ->expectException (QueryException::class);
309
309
$ this ->expectExceptionMessage ('no name specified ' );
310
310
311
- $ this ->db ->drop ->database ('' )->sql ();
311
+ $ this ->db ->drop ->database ('' )->getSQL ();
312
312
}
313
313
314
314
public function testDropTableNoNameException ():void {
315
315
$ this ->expectException (QueryException::class);
316
316
$ this ->expectExceptionMessage ('no name specified ' );
317
317
318
- $ this ->db ->drop ->table ('' )->sql ();
318
+ $ this ->db ->drop ->table ('' )->getSQL ();
319
319
}
320
320
321
321
public function testInsertTableNoNameException ():void {
322
322
$ this ->expectException (QueryException::class);
323
323
$ this ->expectExceptionMessage ('no name specified ' );
324
324
325
- $ this ->db ->insert ->into ('' )->sql ();
325
+ $ this ->db ->insert ->into ('' )->getSQL ();
326
326
}
327
327
328
328
public function testInsertInvalidDataException ():void {
329
329
$ this ->expectException (QueryException::class);
330
330
$ this ->expectExceptionMessage ('no values given ' );
331
331
332
- $ this ->db ->insert ->into ('foo ' )->values ([])->sql ();
332
+ $ this ->db ->insert ->into ('foo ' )->values ([])->getSQL ();
333
333
}
334
334
335
335
public function testSelectEmptyFromException ():void {
336
336
$ this ->expectException (QueryException::class);
337
337
$ this ->expectExceptionMessage ('no FROM expression specified ' );
338
338
339
- $ this ->db ->select ->from ([])->sql ();
339
+ $ this ->db ->select ->from ([])->getSQL ();
340
340
}
341
341
342
342
public function testUpdateNoTableException ():void {
343
343
$ this ->expectException (QueryException::class);
344
344
$ this ->expectExceptionMessage ('no name specified ' );
345
345
346
- $ this ->db ->update ->table ('' )->sql ();
346
+ $ this ->db ->update ->table ('' )->getSQL ();
347
347
}
348
348
349
349
public function testUpdateNoSetException ():void {
350
350
$ this ->expectException (QueryException::class);
351
351
$ this ->expectExceptionMessage ('no fields to update specified ' );
352
352
353
- $ this ->db ->update ->table ('foo ' )->set ([])->sql ();
353
+ $ this ->db ->update ->table ('foo ' )->set ([])->getSQL ();
354
354
}
355
355
356
356
public function testDeleteNoTableException ():void {
357
357
$ this ->expectException (QueryException::class);
358
358
$ this ->expectExceptionMessage ('no name specified ' );
359
359
360
- $ this ->db ->delete ->from ('' )->sql ();
360
+ $ this ->db ->delete ->from ('' )->getSQL ();
361
361
}
362
362
363
363
}
0 commit comments