mirror of
https://github.com/filegator/filegator.git
synced 2025-08-16 15:24:07 +02:00
storage config simplified
This commit is contained in:
@@ -41,12 +41,9 @@ class ArchiverTest extends TestCase
|
||||
$storage = new Filesystem();
|
||||
$storage->init([
|
||||
'separator' => '/',
|
||||
'filesystem_adapter' => 'nulladapter',
|
||||
'adapters' => [
|
||||
'nulladapter' => function () {
|
||||
return new \League\Flysystem\Adapter\NullAdapter();
|
||||
},
|
||||
],
|
||||
'adapter' => function () {
|
||||
return new \League\Flysystem\Adapter\NullAdapter();
|
||||
},
|
||||
]);
|
||||
|
||||
$uniqid = $this->archiver->createArchive($storage);
|
||||
@@ -60,12 +57,9 @@ class ArchiverTest extends TestCase
|
||||
$storage = new Filesystem();
|
||||
$storage->init([
|
||||
'separator' => '/',
|
||||
'filesystem_adapter' => 'memoryadapter',
|
||||
'adapters' => [
|
||||
'memoryadapter' => function () {
|
||||
return new \League\Flysystem\Memory\MemoryAdapter();
|
||||
},
|
||||
],
|
||||
'adapter' => function () {
|
||||
return new \League\Flysystem\Memory\MemoryAdapter();
|
||||
},
|
||||
]);
|
||||
|
||||
$storage->createDir('/', 'test');
|
||||
@@ -85,12 +79,9 @@ class ArchiverTest extends TestCase
|
||||
$storage = new Filesystem();
|
||||
$storage->init([
|
||||
'separator' => '/',
|
||||
'filesystem_adapter' => 'memoryadapter',
|
||||
'adapters' => [
|
||||
'memoryadapter' => function () {
|
||||
return new \League\Flysystem\Memory\MemoryAdapter();
|
||||
},
|
||||
],
|
||||
'adapter' => function () {
|
||||
return new \League\Flysystem\Memory\MemoryAdapter();
|
||||
},
|
||||
]);
|
||||
|
||||
$storage->createDir('/', 'test');
|
||||
@@ -110,12 +101,9 @@ class ArchiverTest extends TestCase
|
||||
$storage = new Filesystem();
|
||||
$storage->init([
|
||||
'separator' => '/',
|
||||
'filesystem_adapter' => 'memoryadapter',
|
||||
'adapters' => [
|
||||
'memoryadapter' => function () {
|
||||
return new \League\Flysystem\Memory\MemoryAdapter();
|
||||
},
|
||||
],
|
||||
'adapter' => function () {
|
||||
return new \League\Flysystem\Memory\MemoryAdapter();
|
||||
},
|
||||
]);
|
||||
|
||||
$stream = fopen(TEST_ARCHIVE, 'r');
|
||||
|
@@ -33,14 +33,11 @@ class FilesystemTest extends TestCase
|
||||
$this->storage = new Filesystem();
|
||||
$this->storage->init([
|
||||
'separator' => '/',
|
||||
'filesystem_adapter' => 'localfilesystem',
|
||||
'adapters' => [
|
||||
'localfilesystem' => function () {
|
||||
return new \League\Flysystem\Adapter\Local(
|
||||
TEST_REPOSITORY
|
||||
);
|
||||
},
|
||||
],
|
||||
'adapter' => function () {
|
||||
return new \League\Flysystem\Adapter\Local(
|
||||
TEST_REPOSITORY
|
||||
);
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -52,14 +52,11 @@ return [
|
||||
'handler' => '\Filegator\Services\Storage\Filesystem',
|
||||
'config' => [
|
||||
'separator' => '/',
|
||||
'filesystem_adapter' => 'localfilesystem',
|
||||
'adapters' => [
|
||||
'localfilesystem' => function () {
|
||||
return new \League\Flysystem\Adapter\Local(
|
||||
TEST_REPOSITORY
|
||||
);
|
||||
},
|
||||
],
|
||||
'adapter' => function () {
|
||||
return new \League\Flysystem\Adapter\Local(
|
||||
TEST_REPOSITORY
|
||||
);
|
||||
},
|
||||
],
|
||||
],
|
||||
'Filegator\Services\Auth\AuthInterface' => [
|
||||
|
Reference in New Issue
Block a user