|
|
|
|
@ -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,12 +181,20 @@ 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), |
|
|
|
|
); |
|
|
|
|
|