We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b925dc commit bc093e4Copy full SHA for bc093e4
tests/ModelTest.php
@@ -440,7 +440,7 @@ public function testCarbonDateMockingWorks()
440
441
Carbon::setTestNow($fakeDate);
442
$item = Item::create(['name' => 'sword']);
443
-
+
444
$this->assertLessThan(1, $fakeDate->diffInSeconds($item->created_at));
445
}
446
@@ -572,4 +572,15 @@ public function testChunkById(): void
572
573
$this->assertEquals(3, $count);
574
575
576
+ public function toSqlTest(): void
577
+ {
578
+ $this->assertTrue(
579
+ is_string(User::where('age', 30)->toSql())
580
+ );
581
582
583
+ is_string(User::whereRaw(['age' => ['$gt' => 30, '$lt' => 40]])->toSql())
584
585
+ }
586
0 commit comments