summaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/ObjectStore/ObjectStoreTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/ObjectStore/ObjectStoreTest.php')
-rw-r--r--tests/lib/Files/ObjectStore/ObjectStoreTest.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lib/Files/ObjectStore/ObjectStoreTest.php b/tests/lib/Files/ObjectStore/ObjectStoreTest.php
index 9300a9bdef6..4ec44eb410d 100644
--- a/tests/lib/Files/ObjectStore/ObjectStoreTest.php
+++ b/tests/lib/Files/ObjectStore/ObjectStoreTest.php
@@ -108,4 +108,20 @@ abstract class ObjectStoreTest extends TestCase {
$this->assertFalse($instance->objectExists('2'));
}
+
+ public function testCopy() {
+ $stream = $this->stringToStream('foobar');
+
+ $instance = $this->getInstance();
+
+ $instance->writeObject('source', $stream);
+
+ $this->assertFalse($instance->objectExists('target'));
+
+ $instance->copyObject('source', 'target');
+
+ $this->assertTrue($instance->objectExists('target'));
+
+ $this->assertEquals('foobar', stream_get_contents($instance->readObject('target')));
+ }
}