| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace GeneaLabs\LaravelModelCaching\Tests\Integration; |
||
| 9 | public function testHasRelationshipResults() |
||
| 10 | { |
||
| 11 | $booksWithStores = (new Book) |
||
| 12 | ->with("stores") |
||
| 13 | ->has("stores") |
||
| 14 | ->get(); |
||
| 15 | $key = "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:books:genealabslaravelmodelcachingtestsfixturesbook-exists-and_books.id_=_book_store.book_id-testing:{$this->testingSqlitePath}testing.sqlite:stores"; |
||
| 16 | $tags = [ |
||
| 17 | "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesbook", |
||
| 18 | "genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesstore", |
||
| 19 | ]; |
||
| 20 | $cachedResults = $this |
||
| 21 | ->cache() |
||
| 22 | ->tags($tags) |
||
| 23 | ->get(sha1($key))["value"]; |
||
| 24 | |||
| 25 | $this->assertNotEmpty($booksWithStores); |
||
| 26 | $this->assertEquals($booksWithStores, $cachedResults); |
||
| 27 | } |
||
| 28 | |||
| 48 |