| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 15 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php namespace GeneaLabs\LaravelModelCaching\Tests\Integration\CachedBuilder; |
||
| 8 | public function testIncrementingInvalidatesCache() |
||
| 9 | { |
||
| 10 | $book = (new Book) |
||
| 11 | ->find(1); |
||
| 12 | $originalPrice = $book->price; |
||
| 13 | $originalDescription = $book->description; |
||
| 14 | |||
| 15 | $book->increment("price", 1.25, ["description" => "test description update"]); |
||
| 16 | $book = (new Book) |
||
| 17 | ->find(1); |
||
| 18 | |||
| 19 | $this->assertEquals($originalPrice + 1.25, $book->price); |
||
| 20 | $this->assertNotEquals($originalDescription, $book->description); |
||
| 21 | $this->assertEquals($book->description, "test description update"); |
||
| 22 | } |
||
| 23 | } |
||
| 24 |