| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 18 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php namespace GeneaLabs\LaravelModelCaching\Tests\Integration\CachedBuilder; |
||
| 8 | public function testInRandomOrderCachesResults() |
||
| 9 | { |
||
| 10 | $book = (new Book) |
||
| 11 | ->with("stores") |
||
| 12 | ->whereHas("stores") |
||
| 13 | ->first(); |
||
| 14 | $book->stores() |
||
| 15 | ->update(["name" => "test store name change"]); |
||
| 16 | $updatedCount = (new Book) |
||
| 17 | ->with("stores") |
||
| 18 | ->whereHas("stores") |
||
| 19 | ->first() |
||
| 20 | ->stores() |
||
| 21 | ->where("name", "test store name change") |
||
| 22 | ->count(); |
||
| 23 | |||
| 24 | $this->assertEquals(1, $updatedCount); |
||
| 25 | } |
||
| 26 | } |
||
| 27 |