Ejemplo n.º 1
0
 /**
  * Creates a new Filesystem instance.
  *
  * @param  array  $config
  * @param  \Cartalyst\Filesystem\FilesystemManager  $manager
  * @return \Cartalyst\Filesystem\Filesystem
  */
 public function make(array $config, FilesystemManager $manager)
 {
     $adapter = $this->adapter->make($config);
     $filesystem = new Filesystem($adapter);
     $filesystem->setManager($manager);
     return $filesystem;
 }
Ejemplo n.º 2
0
 /**
  * @test
  * @expectedException \InvalidArgumentException
  */
 public function it_throws_an_invalid_argument_exception_if_no_adapter_is_set()
 {
     $adapter = ['path' => 'public/filesystem'];
     $this->adapter->make($adapter);
 }