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.
2 parents 0e0add1 + 73de75f commit 8fb0532Copy full SHA for 8fb0532
tests/Unit/CachedBuilderTest.php
@@ -500,7 +500,18 @@ public function testColumnsRelationshipWhereClauseParsing()
500
501
public function testRawWhereClauseParsing()
502
{
503
- // ->whereRaw(...)
504
- $this->markTestIncomplete();
+ $authors = collect([(new Author)
+ ->whereRaw('name <> \'\'')->first()]);
505
+
506
+ $key = 'genealabslaravelmodelcachingtestsfixturesauthor_and_name-first';
507
+ $tags = ['genealabslaravelmodelcachingtestsfixturesauthor'];
508
509
+ $cachedResults = collect([cache()->tags($tags)->get($key)]);
510
511
+ $liveResults = collect([(new UncachedAuthor)
512
513
514
+ $this->assertTrue($authors->diffAssoc($cachedResults)->isEmpty());
515
+ $this->assertTrue($liveResults->diffAssoc($cachedResults)->isEmpty());
516
}
517
0 commit comments