From 6c9f2644cf8bac151b9af743802eb72a51278e8b Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 10 Dec 2018 17:20:45 +0100 Subject: Add objectExists to objectstore interface Signed-off-by: Robin Appelman --- tests/lib/Files/ObjectStore/ObjectStoreTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/lib/Files/ObjectStore/ObjectStoreTest.php') 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')); + } } -- cgit v1.2.3