Added permanent store feature
This commit is contained in:
1 parent
29e59c2b3c
commit
1f938cf19d
3 files changed
+200
-17
No files matched your search
@@ -26,4 +26,30 @@ class ObjectRetrieverTest extends \PHPUnit\Framework\TestCase {
|
||||
]);
|
||||
}
|
||||
|
||||
public function testPermanentStoreWithExistingDirectory() {
|
||||
$retriever = new ObjectRetriever([
|
||||
'permanent_store_directory' => sys_get_temp_dir(),
|
||||
'permanent_store_scope' => '*',
|
||||
]);
|
||||
$this->assertInstanceOf(ObjectRetriever::class, $retriever);
|
||||
}
|
||||
|
||||
public function testPermanentStoreWithMissingDirectory() {
|
||||
$this->expectException(InvalidSDKConfigurationException::class);
|
||||
new ObjectRetriever([
|
||||
'permanent_store_directory' => sys_get_temp_dir().'/does-not-exist-'.uniqid(),
|
||||
'permanent_store_scope' => '*',
|
||||
]);
|
||||
}
|
||||
|
||||
public function testPermanentStoreWithSameDirectoryAsFallbackStore() {
|
||||
$this->expectException(InvalidSDKConfigurationException::class);
|
||||
new ObjectRetriever([
|
||||
'fallback_store_directory' => sys_get_temp_dir(),
|
||||
'fallback_store_scope' => '*',
|
||||
'permanent_store_directory' => sys_get_temp_dir(),
|
||||
'permanent_store_scope' => '*',
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user