diff --git a/src/Storage/Device/OracleObject.php b/src/Storage/Device/OracleObject.php index e69de29b..5e54d061 100644 --- a/src/Storage/Device/OracleObject.php +++ b/src/Storage/Device/OracleObject.php @@ -0,0 +1,57 @@ +root = $root; + } + + /** + * @return string + */ + public function getName(): string + { + return 'Oracle Object Storage'; + } + + /** + * @return string + */ + public function getType(): string + { + return Storage::DEVICE_ORACLE_OBJECT; + } + + /** + * @return string + */ + public function getDescription(): string + { + return 'Adapter for Oracle Object Storage.'; + } + + /** + * @return string + */ + public function getRoot(): string + { + return $this->root; + } +} diff --git a/src/Storage/Storage.php b/src/Storage/Storage.php index cabd18c8..712caee8 100644 --- a/src/Storage/Storage.php +++ b/src/Storage/Storage.php @@ -21,6 +21,8 @@ class Storage const DEVICE_LINODE = 'linode'; + const DEVICE_ORACLEOBJECT = 'oracleobject'; + /** * Devices. * diff --git a/tests/Storage/Device/OracleObjectTest.php b/tests/Storage/Device/OracleObjectTest.php index e69de29b..433815ed 100644 --- a/tests/Storage/Device/OracleObjectTest.php +++ b/tests/Storage/Device/OracleObjectTest.php @@ -0,0 +1,55 @@ +oracleObject = new OracleObject('oracle-object-root'); + } + + public function testUploadFileToOracleObjectStorage() + { + // Implement your test for the upload method here + $localFilePath = 'local_file.txt'; + $remoteFilePath = 'remote_file.txt'; + + // Call the method you want to test + $result = $this->oracleObject->uploadFileToOracleObjectStorage($localFilePath, $remoteFilePath); + + // Assert that the upload was successful (you can customize this assertion) + $this->assertTrue($result); + } + + public function testDownloadFileFromOracleObjectStorage() + { + // Implement your test for the download method here + $remoteFilePath = 'remote_file.txt'; + $localFilePath = 'downloaded_file.txt'; + + // Call the method you want to test + $result = $this->oracleObject->downloadFileFromOracleObjectStorage($remoteFilePath, $localFilePath); + + // Assert that the download was successful (you can customize this assertion) + $this->assertTrue($result); + } + + public function testDeleteFileFromOracleObjectStorage() + { + // Implement your test for the delete method here + $remoteFilePath = 'remote_file.txt'; + + // Call the method you want to test + $result = $this->oracleObject->deleteFileFromOracleObjectStorage($remoteFilePath); + + // Assert that the delete was successful (you can customize this assertion) + $this->assertTrue($result); + } +}