| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace GeneaLabs\LaravelModelCaching\Tests\Integration\CachedBuilder; |
||
| 9 | public function testInRandomOrderCachesResults() |
||
| 10 | { |
||
| 11 | $cachedBook1 = (new Book) |
||
| 12 | ->inRandomOrder() |
||
| 13 | ->first(); |
||
| 14 | $cachedBook2 = (new Book) |
||
| 15 | ->inRandomOrder() |
||
| 16 | ->first(); |
||
| 17 | $book1 = (new UncachedBook) |
||
| 18 | ->inRandomOrder() |
||
| 19 | ->first(); |
||
| 20 | $book2 = (new UncachedBook) |
||
| 21 | ->inRandomOrder() |
||
| 22 | ->first(); |
||
| 23 | |||
| 24 | $this->assertNotEquals($book1, $book2); |
||
| 25 | $this->assertNotEquals($cachedBook1, $cachedBook2); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |