Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-12-10 19:20:45 +0300
committerRobin Appelman <robin@icewind.nl>2018-12-12 17:31:44 +0300
commitfe23285e445c9f452755c306814c6db1e6819d95 (patch)
tree11d121e519fcbcfbc8d9a3bbfc1155a939a80147 /tests
parent474c9fb8e5d2c628a2212a611ffe456c183ad2c0 (diff)
Add objectExists to objectstore interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Files/ObjectStore/ObjectStoreTest.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/lib/Files/ObjectStore/ObjectStoreTest.php b/tests/lib/Files/ObjectStore/ObjectStoreTest.php
index 2116306053e..1383c0149a2 100644
--- a/tests/lib/Files/ObjectStore/ObjectStoreTest.php
+++ b/tests/lib/Files/ObjectStore/ObjectStoreTest.php
@@ -94,4 +94,19 @@ abstract class ObjectStoreTest extends TestCase {
$this->assertEquals(1, 1);
}
}
+
+ public function testExists() {
+ $stream = $this->stringToStream('foobar');
+
+ $instance = $this->getInstance();
+ $this->assertFalse($instance->objectExists('2'));
+
+ $instance->writeObject('2', $stream);
+
+ $this->assertTrue($instance->objectExists('2'));
+
+ $instance->deleteObject('2');
+
+ $this->assertFalse($instance->objectExists('2'));
+ }
}