for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Foundation\Tests;
use Foundation\Abstracts\Tests\TestCase;
use Foundation\Cache\ModelCache;
use Modules\User\Entities\User;
class CacheObserverTest extends TestCase
{
public function testCache()
$user = $this->createUser();
$this->assertEquals($user, ModelCache::find($user->getKey(), User::class));
}
public function testClearModelsCache()
$this->assertNotNull(ModelCache::find($user->getKey(), User::class));
ModelCache::clearAll();
$this->assertEquals(null, ModelCache::findWithoutRequery($user->getKey(), User::class));
public function testClearSpecificModelCache()
ModelCache::clearModel($user);