|
|
|
@ -74,6 +74,22 @@ class Test_OC_OCS_Privatedata extends PHPUnit_Framework_TestCase |
|
|
|
$this->assertOcsResult(2, $result); |
|
|
|
$this->assertOcsResult(2, $result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @dataProvider deleteWithEmptyKeysProvider |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function testDeleteWithEmptyKeys($params) { |
|
|
|
|
|
|
|
$result = OC_OCS_Privatedata::delete($params); |
|
|
|
|
|
|
|
$this->assertEquals(101, $result->getStatusCode()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function deleteWithEmptyKeysProvider() { |
|
|
|
|
|
|
|
return array( |
|
|
|
|
|
|
|
array(array()), |
|
|
|
|
|
|
|
array(array('app' => '123')), |
|
|
|
|
|
|
|
array(array('key' => '123')), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @param \OC_OCS_Result $result |
|
|
|
* @param \OC_OCS_Result $result |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|