Support petabytes
Test Plan: New test. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2821
This commit is contained in:
parent
77f44ded98
commit
ecf92ac00f
|
@ -61,6 +61,11 @@ final class PhabricatorUnitsTestCase extends PhabricatorTestCase {
|
||||||
phabricator_parse_bytes($input),
|
phabricator_parse_bytes($input),
|
||||||
'phabricator_parse_bytes('.$input.')');
|
'phabricator_parse_bytes('.$input.')');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->tryTestCases(
|
||||||
|
array('string' => 'string'),
|
||||||
|
array(false),
|
||||||
|
'phabricator_parse_bytes');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDetailedDurationFormatting() {
|
public function testDetailedDurationFormatting() {
|
||||||
|
|
|
@ -218,6 +218,7 @@ function phabricator_parse_bytes($input) {
|
||||||
'm' => 1000 * 1000,
|
'm' => 1000 * 1000,
|
||||||
'g' => 1000 * 1000 * 1000,
|
'g' => 1000 * 1000 * 1000,
|
||||||
't' => 1000 * 1000 * 1000 * 1000,
|
't' => 1000 * 1000 * 1000 * 1000,
|
||||||
|
'p' => 1000 * 1000 * 1000 * 1000 * 1000,
|
||||||
);
|
);
|
||||||
|
|
||||||
$bytes = (float)$bytes;
|
$bytes = (float)$bytes;
|
||||||
|
|
Loading…
Reference in a new issue