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