diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-24 13:06:27 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-24 13:12:45 +0200 |
commit | 781cfff2216c4dfab109996f62ee7afd912dce17 (patch) | |
tree | 37c656fe0030ee358ebccd2b09a20ed1337637df | |
parent | 1592be117a4286508b7841a2b1e640d3655e7503 (diff) | |
download | nextcloud-server-781cfff2216c4dfab109996f62ee7afd912dce17.tar.gz nextcloud-server-781cfff2216c4dfab109996f62ee7afd912dce17.zip |
Deduplicate data provider and fix method visibility
-rw-r--r-- | tests/lib/encryption/updatetest.php | 2 | ||||
-rw-r--r-- | tests/lib/files/storage/wrapper/encryption.php | 32 |
2 files changed, 15 insertions, 19 deletions
diff --git a/tests/lib/encryption/updatetest.php b/tests/lib/encryption/updatetest.php index 28bb0031308..08d4125735d 100644 --- a/tests/lib/encryption/updatetest.php +++ b/tests/lib/encryption/updatetest.php @@ -52,7 +52,7 @@ class UpdateTest extends TestCase { /** @var \OC\Encryption\File | \PHPUnit_Framework_MockObject_MockObject */ private $fileHelper; - public function setUp() { + protected function setUp() { parent::setUp(); $this->view = $this->getMockBuilder('\OC\Files\View') diff --git a/tests/lib/files/storage/wrapper/encryption.php b/tests/lib/files/storage/wrapper/encryption.php index 2d3f10ecdfa..a257ca24a0c 100644 --- a/tests/lib/files/storage/wrapper/encryption.php +++ b/tests/lib/files/storage/wrapper/encryption.php @@ -44,7 +44,7 @@ class Encryption extends \Test\Files\Storage\Storage { */ private $update; - public function setUp() { + protected function setUp() { parent::setUp(); @@ -127,7 +127,7 @@ class Encryption extends \Test\Files\Storage\Storage { } /** - * @dataProvider dataTestRename + * @dataProvider dataTestCopyAndRename * * @param string $source * @param string $target @@ -154,25 +154,13 @@ class Encryption extends \Test\Files\Storage\Storage { } /** - * data provider for testRename() - * - * @return array - */ - public function dataTestRename() { - return array( - array('source', 'target', false), - array('source', '/subFolder/target', true), - ); - } - - /** - * @dataProvider dataTestCopy + * @dataProvider dataTestCopyAndRename * * @param string $source * @param string $target * @param boolean $shouldUpdate */ - public function testCopy($source, $target, $shouldUpdate) { + public function testCopyTesting($source, $target, $shouldUpdate) { $this->keyStore ->expects($this->once()) ->method('copyKeys') @@ -193,13 +181,21 @@ class Encryption extends \Test\Files\Storage\Storage { } /** - * data provider for testRename() + * @dataProvider copyAndMoveProvider + */ + public function testCopy($source, $target) { + $this->assertTrue(true, 'Replaced by testCopyTesting()'); + } + + /** + * data provider for testCopyTesting() and dataTestCopyAndRename() * * @return array */ - public function dataTestCopy() { + public function dataTestCopyAndRename() { return array( array('source', 'target', false), + array('source', 'target', false), array('source', '/subFolder/target', true), ); } |