Esempio n. 1
0
 public function testSettingVisibility()
 {
     $path = '/test.txt';
     $config = new Config(['visibility' => AdapterInterface::VISIBILITY_PUBLIC]);
     $meta = $this->adapter->write($path, 'Some Content', $config);
     $this->adapter->setVisibility($path, AdapterInterface::VISIBILITY_PRIVATE);
     $rows = [['visibility' => AdapterInterface::VISIBILITY_PRIVATE]];
     $expected = (new ArrayDataSet(['flysystem_path' => $rows]))->getTable('flysystem_path');
     $select = "SELECT visibility FROM flysystem_path WHERE path_id = {$meta['path_id']}";
     $actual = $this->getConnection()->createQueryTable('flysystem_path', $select);
     $this->assertTablesEqual($expected, $actual);
 }
Esempio n. 2
0
 public function testGetMetadataWithDbFailure()
 {
     $this->setupBasicDbResponse(false);
     $this->assertFalse($this->adapter->getMetadata('/path'));
 }