1 | <?php |
||
2 | |||
3 | namespace StorageTests; |
||
4 | |||
5 | |||
6 | use kalanis\kw_storage\Interfaces\IStorage; |
||
7 | use kalanis\kw_storage\Storage as XStorage; |
||
8 | |||
9 | |||
10 | abstract class AStorageTest extends \CommonTestClass |
||
11 | { |
||
12 | /** |
||
13 | * @param IStorage|string $mockStorage |
||
14 | * @return XStorage\Storage |
||
15 | */ |
||
16 | protected function getStorage($mockStorage): XStorage\Storage |
||
17 | { |
||
18 | XStorage\Key\DirKey::setDir(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR); |
||
19 | $storage = new XStorage\Factory(new XStorage\Key\Factory(), new XStorage\Target\Factory()); |
||
20 | return $storage->getStorage($mockStorage); |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
21 | } |
||
22 | } |
||
23 |