@@ -377,7 +377,7 @@ public function testLoadBy()
377
377
$ m = new Model ($ db , ['table ' => 'types ' ]);
378
378
$ m ->addField ('date ' , ['type ' => 'date ' , 'dateTimeClass ' => MyDate::class]);
379
379
380
- $ m ->loadAny ();
380
+ $ m ->loadOne ();
381
381
$ this ->assertTrue ($ m ->loaded ());
382
382
$ d = $ m ->get ('date ' );
383
383
$ m ->unload ();
@@ -386,7 +386,7 @@ public function testLoadBy()
386
386
$ this ->assertTrue ($ m ->loaded ());
387
387
$ m ->unload ();
388
388
389
- $ m ->addCondition ('date ' , $ d )->loadAny ();
389
+ $ m ->addCondition ('date ' , $ d )->loadOne ();
390
390
$ this ->assertTrue ($ m ->loaded ());
391
391
}
392
392
@@ -453,7 +453,7 @@ public function testTimestamp()
453
453
454
454
$ m = new Model ($ db , ['table ' => 'types ' ]);
455
455
$ m ->addField ('ts ' , ['actual ' => 'date ' , 'type ' => 'datetime ' ]);
456
- $ m ->loadAny ();
456
+ $ m ->loadOne ();
457
457
458
458
// must respect 'actual'
459
459
$ this ->assertNotNull ($ m ->get ('ts ' ));
@@ -475,7 +475,7 @@ public function testBadTimestamp()
475
475
$ m = new Model ($ db , ['table ' => 'types ' ]);
476
476
$ m ->addField ('ts ' , ['actual ' => 'date ' , 'type ' => 'datetime ' ]);
477
477
$ this ->expectException (Exception::class);
478
- $ m ->loadAny ();
478
+ $ m ->loadOne ();
479
479
}
480
480
481
481
public function testDirtyTimestamp ()
@@ -493,7 +493,7 @@ public function testDirtyTimestamp()
493
493
494
494
$ m = new Model ($ db , ['table ' => 'types ' ]);
495
495
$ m ->addField ('ts ' , ['actual ' => 'date ' , 'type ' => 'datetime ' ]);
496
- $ m ->loadAny ();
496
+ $ m ->loadOne ();
497
497
$ m ->set ('ts ' , clone $ m ->get ('ts ' ));
498
498
499
499
$ this ->assertFalse ($ m ->isDirty ('ts ' ));
@@ -512,7 +512,7 @@ public function testTimestampSave()
512
512
513
513
$ m = new Model ($ db , ['table ' => 'types ' ]);
514
514
$ m ->addField ('ts ' , ['actual ' => 'date ' , 'type ' => 'date ' ]);
515
- $ m ->loadAny ();
515
+ $ m ->loadOne ();
516
516
$ m ->set ('ts ' , new \DateTime ('2012-02-30 ' ));
517
517
$ m ->save ();
518
518
@@ -575,7 +575,7 @@ public function testDirtyTime()
575
575
576
576
$ m = new Model ($ db , ['table ' => 'types ' ]);
577
577
$ m ->addField ('ts ' , ['actual ' => 'date ' , 'type ' => 'time ' ]);
578
- $ m ->loadAny ();
578
+ $ m ->loadOne ();
579
579
580
580
$ m ->set ('ts ' , $ sql_time_new );
581
581
$ this ->assertTrue ($ m ->isDirty ('ts ' ));
@@ -603,7 +603,7 @@ public function testDirtyTimeAfterSave()
603
603
604
604
$ m = new Model ($ db , ['table ' => 'types ' ]);
605
605
$ m ->addField ('ts ' , ['actual ' => 'date ' , 'type ' => 'time ' ]);
606
- $ m ->loadAny ();
606
+ $ m ->loadOne ();
607
607
608
608
$ m ->set ('ts ' , $ sql_time );
609
609
$ this ->assertTrue ($ m ->isDirty ('ts ' ));
0 commit comments