mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
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
2 changed files with 6 additions and 0 deletions
|
@ -61,6 +61,11 @@ final class PhabricatorUnitsTestCase extends PhabricatorTestCase {
|
|||
phabricator_parse_bytes($input),
|
||||
'phabricator_parse_bytes('.$input.')');
|
||||
}
|
||||
|
||||
$this->tryTestCases(
|
||||
array('string' => 'string'),
|
||||
array(false),
|
||||
'phabricator_parse_bytes');
|
||||
}
|
||||
|
||||
public function testDetailedDurationFormatting() {
|
||||
|
|
|
@ -218,6 +218,7 @@ function phabricator_parse_bytes($input) {
|
|||
'm' => 1000 * 1000,
|
||||
'g' => 1000 * 1000 * 1000,
|
||||
't' => 1000 * 1000 * 1000 * 1000,
|
||||
'p' => 1000 * 1000 * 1000 * 1000 * 1000,
|
||||
);
|
||||
|
||||
$bytes = (float)$bytes;
|
||||
|
|
Loading…
Reference in a new issue