|
10 | 10 |
|
11 | 11 | require_once(__DIR__.'/../../bootstrap/unit.php'); |
12 | 12 |
|
13 | | -$t = new lime_test(103); |
| 13 | +$t = new lime_test(94); |
14 | 14 |
|
15 | 15 | class PreValidator extends sfValidatorBase |
16 | 16 | { |
@@ -417,16 +417,7 @@ public function getBytes($value) |
417 | 417 | $t->is($v->getBytes('0'), 0, 'simple bytes'); |
418 | 418 | $t->is($v->getBytes('1'), 1, 'simple bytes'); |
419 | 419 | $t->is($v->getBytes('1B'), 1, 'simple bytes'); |
420 | | -$t->is($v->getBytes('1K'), 1024, 'kilobytes short syntax'); |
421 | | -$t->is($v->getBytes('1 K'), 1024, 'kilobytes short syntax with space delimiter'); |
422 | | -$t->is($v->getBytes('1KB'), 1024, 'kilobytes long syntax'); |
423 | | -$t->is($v->getBytes('1 KB'), 1024, 'kilobytes long syntax with space delimiter'); |
| 420 | +$t->is($v->getBytes('1K'), 1024, 'kilobytes'); |
424 | 421 | $t->is($v->getBytes('1M'), 1024 * 1024, 'megabytes short syntax'); |
425 | | -$t->is($v->getBytes('0.5M'), 1024 * 1024 / 2, 'fractional megabytes short syntax'); |
426 | | -$t->is($v->getBytes('0.5 M'), 1024 * 1024 / 2, 'fractional megabytes short syntax with space delimeter'); |
427 | | -$t->is($v->getBytes('1 G'), 1024 * 1024 * 1024, 'gigabytes'); |
428 | | -$t->is($v->getBytes('1 T'), 1024 * 1024 * 1024 * 1024, 'terabytes'); |
429 | | -$t->is($v->getBytes('1 P'), 1024 * 1024 * 1024 * 1024 * 1024, 'petabytes'); |
430 | | -$t->is($v->getBytes('1 E'), 1024 * 1024 * 1024 * 1024 * 1024 * 1024, 'exabytes'); |
431 | | -$t->is($v->getBytes('1 Z'), 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024, 'zettabytes'); |
432 | | -$t->is($v->getBytes('1 Y'), 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024, 'yottabytes'); |
| 422 | +$t->is($v->getBytes('0.5M'), 1024 * 1024 / 2, 'fractional megabytes'); |
| 423 | +$t->is($v->getBytes('1G'), 1024 * 1024 * 1024, 'gigabytes'); |
0 commit comments