Files
CloudObjects-PHP-SDK/tests/OfflineTests/ObjectRetrieverTest.php
T
2026-10-18 16:46:17 +00:00

30 lines
992 B
PHP

<?php
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
namespace CloudObjects\SDK;
use CloudObjects\SDK\Exceptions\InvalidSDKConfigurationException;
class ObjectRetrieverTest extends \PHPUnit\Framework\TestCase {
public function testFallbackStoreWithExistingDirectory() {
$retriever = new ObjectRetriever([
'fallback_store_directory' => sys_get_temp_dir(),
'fallback_store_scope' => '*',
]);
$this->assertInstanceOf(ObjectRetriever::class, $retriever);
}
public function testFallbackStoreWithMissingDirectory() {
$this->expectException(InvalidSDKConfigurationException::class);
new ObjectRetriever([
'fallback_store_directory' => sys_get_temp_dir().'/does-not-exist-'.uniqid(),
'fallback_store_scope' => '*',
]);
}
}