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()); }
public function testGetCacheWithNoneSet() { $this->setExpectedException('InvalidArgumentException', 'A "cache" file system must be set.'); $server = new ServerFactory(); $server->getCache(); }
public function testGetCacheWithInvalidParam() { $this->setExpectedException('InvalidArgumentException', 'Invalid `cache` parameter.'); $server = new ServerFactory([]); $server->getCache(); }