[Pkg-owncloud-commits] [owncloud] 46/215: Deduplicate data provider and fix method visibility
David Prévot
taffit at moszumanska.debian.org
Tue May 5 01:01:20 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 781cfff2216c4dfab109996f62ee7afd912dce17
Author: Joas Schilling <nickvergessen at owncloud.com>
Date: Fri Apr 24 13:06:27 2015 +0200
Deduplicate data provider and fix method visibility
---
tests/lib/encryption/updatetest.php | 2 +-
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 28bb003..08d4125 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 2d3f10e..a257ca2 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),
);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list