| Total Complexity | 3 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class CacheObserverTest extends TestCase |
||
| 10 | { |
||
| 11 | |||
| 12 | public function testCache() |
||
| 13 | { |
||
| 14 | $user = $this->createUser(); |
||
| 15 | $this->assertEquals($user, ModelCache::find($user->getKey(), User::class)); |
||
| 16 | |||
| 17 | } |
||
| 18 | |||
| 19 | public function testClearModelsCache() |
||
| 20 | { |
||
| 21 | $user = $this->createUser(); |
||
| 22 | |||
| 23 | $this->assertNotNull(ModelCache::find($user->getKey(), User::class)); |
||
| 24 | ModelCache::clearAll(); |
||
| 25 | $this->assertEquals(null, ModelCache::findWithoutRequery($user->getKey(), User::class)); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function testClearSpecificModelCache() |
||
| 35 | } |
||
| 36 | |||
| 37 | } |
||
| 38 |