Ejemplo n.º 1
0
 public function testGetCache()
 {
     $server = new ServerFactory(['cache' => Mockery::mock('League\\Flysystem\\FilesystemInterface')]);
     $this->assertInstanceOf('League\\Flysystem\\FilesystemInterface', $server->getCache());
     $server = new ServerFactory(['cache' => sys_get_temp_dir()]);
     $this->assertInstanceOf('League\\Flysystem\\FilesystemInterface', $server->getCache());
 }
Ejemplo n.º 2
0
 public function testGetCacheWithNoneSet()
 {
     $this->setExpectedException('InvalidArgumentException', 'A "cache" file system must be set.');
     $server = new ServerFactory();
     $server->getCache();
 }
Ejemplo n.º 3
0
 public function testGetCacheWithInvalidParam()
 {
     $this->setExpectedException('InvalidArgumentException', 'Invalid `cache` parameter.');
     $server = new ServerFactory([]);
     $server->getCache();
 }