Esempio n. 1
0
 /**
  * @dataProvider  dropboxProvider
  */
 public function testListContents(Dropbox $adapter, $mock)
 {
     $mock->shouldReceive('getMetadataWithChildren')->andReturn(['contents' => [['is_dir' => true, 'path' => 'dirname']]], ['contents' => [['is_dir' => false, 'path' => 'dirname/file']]], false);
     $result = $adapter->listContents('', true);
     $this->assertCount(2, $result);
     $this->assertEquals([], $adapter->listContents('', false));
 }
 /**
  * @dataProvider  dropboxProvider
  */
 public function testListContents(Dropbox $adapter, $mock)
 {
     $mock->getMetadataWithChildren(Argument::type('string'))->willReturn(['contents' => [['is_dir' => true, 'path' => 'dirname']]], ['contents' => [['is_dir' => false, 'path' => 'dirname/file']]], false);
     $result = $adapter->listContents('', true);
     $this->assertCount(2, $result);
     $this->assertEquals([], $adapter->listContents('', false));
 }
 /**
  * Constructor
  *
  * @param Client $client
  * @param array  $backendConfig
  */
 public function __construct(Client $client, array $backendConfig)
 {
     $this->backendConfig = $backendConfig;
     parent::__construct($client, isset($backendConfig['root']) ? $backendConfig['root'] : null);
 }
Esempio n. 4
0
 /**
  *
  * @ignore (non-PHPdoc)
  * @see \League\Flysystem\Adapter\Ftp::getMetadata()
  */
 public function getMetadata($path)
 {
     return @parent::getMetadata($path);
 }