aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-05-15 18:07:13 +0200
committerVincent Petry <pvince81@owncloud.com>2015-05-15 18:07:13 +0200
commit246000f799f431066e3647137c4a710d230b4fbe (patch)
tree79848043d11283365916ff0f52d54562ba1e72c5 /tests
parent4c60b13d1e58d009dab40cd74a2aa0b6520acc81 (diff)
parent4659927d7a1f2fdb72fc8ea3d34e5f9cd5e7f497 (diff)
downloadnextcloud-server-246000f799f431066e3647137c4a710d230b4fbe.tar.gz
nextcloud-server-246000f799f431066e3647137c4a710d230b4fbe.zip
Merge pull request #16176 from owncloud/fix-provisioning-api-set-quota
Validate the quota value to be a correct value
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/helper.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/lib/helper.php b/tests/lib/helper.php
index ed15a677300..b7aa185f4e3 100644
--- a/tests/lib/helper.php
+++ b/tests/lib/helper.php
@@ -53,21 +53,22 @@ class Test_Helper extends \Test\TestCase {
}
/**
- * @dataProvider computerFileSizeProvider
+ * @dataProvider providesComputerFileSize
*/
function testComputerFileSize($expected, $input) {
$result = OC_Helper::computerFileSize($input);
$this->assertEquals($expected, $result);
}
- function computerFileSizeProvider(){
- return array(
- array(0.0, "0 B"),
- array(1024.0, "1 kB"),
- array(1395864371.0, '1.3 GB'),
- array(9961472.0, "9.5 MB"),
- array(500041567437.0, "465.7 GB"),
- );
+ function providesComputerFileSize(){
+ return [
+ [0.0, "0 B"],
+ [1024.0, "1 kB"],
+ [1395864371.0, '1.3 GB'],
+ [9961472.0, "9.5 MB"],
+ [500041567437.0, "465.7 GB"],
+ [false, "12 GB etfrhzui"]
+ ];
}
function testGetMimeType() {