public function setUp()
 {
     parent::setUp();
     $this->stub = $this->getMockForAbstractClass(AR::class);
     $this->stub->setConfig(config('lada-cache'));
     $this->stub->method('getDatabase')->will($this->returnValue('database'));
     $this->stub->method('getTables')->will($this->returnValue(['table1', 'table2']));
 }
示例#2
0
 public function setUp()
 {
     parent::setUp();
     $manager = app()->make('LadaCache');
     $reflector = $this->getMockForAbstractClass(AbstractReflector::class, [], '', true, true, true, ['getHash', 'getTags']);
     $reflector->method('getHash')->will($this->returnValue(md5('hash')));
     $reflector->method('getTags')->will($this->returnValue(['tag1', 'tag2']));
     $this->cache = $manager->resolve($reflector);
 }
示例#3
0
 public function setUp()
 {
     parent::setUp();
     $this->manager = app()->make('LadaCache');
 }
示例#4
0
 public function setUp()
 {
     parent::setUp();
     $this->redis = new Redis(config('lada-cache'));
 }