From 6cf9844e9c4790342053e00e4dfaf389275e4c79 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 3 Dec 2013 14:35:53 +0100 Subject: [PATCH] Added unit test for the test() method This is to make sure that method isn't broken --- lib/private/files/storage/wrapper/wrapper.php | 8 ++++++++ tests/lib/files/storage/storage.php | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/lib/private/files/storage/wrapper/wrapper.php b/lib/private/files/storage/wrapper/wrapper.php index 0336c27efa..f9adda8031 100644 --- a/lib/private/files/storage/wrapper/wrapper.php +++ b/lib/private/files/storage/wrapper/wrapper.php @@ -424,4 +424,12 @@ class Wrapper implements \OC\Files\Storage\Storage { public function getETag($path) { return $this->storage->getETag($path); } + + /** + * Returns true + * @return true + */ + public function test() { + return $this->storage->test(); + } } diff --git a/tests/lib/files/storage/storage.php b/tests/lib/files/storage/storage.php index 5a0581665a..182c014d99 100644 --- a/tests/lib/files/storage/storage.php +++ b/tests/lib/files/storage/storage.php @@ -42,6 +42,13 @@ abstract class Storage extends \PHPUnit_Framework_TestCase { $this->assertTrue($this->instance->isUpdatable('/'), 'Root folder is not writable'); } + /** + * Check that the test() function works + */ + public function testTestFunction() { + $this->assertTrue($this->instance->test()); + } + /** * @dataProvider directoryProvider */