Changeset 54855 for trunk/tests/phpunit/tests/functions/sizeFormat.php
- Timestamp:
- 11/17/2022 06:13:47 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/sizeFormat.php
r52955 r54855 15 15 public function _data_size_format() { 16 16 return array( 17 // Invalid values 17 // Invalid values. 18 18 array( array(), 0, false ), 19 19 array( 'baba', 0, false ), … … 21 21 array( '-1', 0, false ), 22 22 array( -1, 0, false ), 23 // Bytes 23 // Bytes. 24 24 array( 0, 0, '0 B' ), 25 25 array( 1, 0, '1 B' ), 26 26 array( 1023, 0, '1,023 B' ), 27 // Kilobytes 27 // Kilobytes. 28 28 array( KB_IN_BYTES, 0, '1 KB' ), 29 29 array( KB_IN_BYTES, 2, '1.00 KB' ), … … 31 31 array( 2.5 * KB_IN_BYTES, 2, '2.50 KB' ), 32 32 array( 10 * KB_IN_BYTES, 0, '10 KB' ), 33 // Megabytes 33 // Megabytes. 34 34 array( (string) 1024 * KB_IN_BYTES, 2, '1.00 MB' ), 35 35 array( MB_IN_BYTES, 0, '1 MB' ), 36 36 array( 2.5 * MB_IN_BYTES, 0, '3 MB' ), 37 37 array( 2.5 * MB_IN_BYTES, 2, '2.50 MB' ), 38 // Gigabytes 38 // Gigabytes. 39 39 array( (string) 1024 * MB_IN_BYTES, 2, '1.00 GB' ), 40 40 array( GB_IN_BYTES, 0, '1 GB' ), 41 41 array( 2.5 * GB_IN_BYTES, 0, '3 GB' ), 42 42 array( 2.5 * GB_IN_BYTES, 2, '2.50 GB' ), 43 // Terabytes 43 // Terabytes. 44 44 array( (string) 1024 * GB_IN_BYTES, 2, '1.00 TB' ), 45 45 array( TB_IN_BYTES, 0, '1 TB' ), 46 46 array( 2.5 * TB_IN_BYTES, 0, '3 TB' ), 47 47 array( 2.5 * TB_IN_BYTES, 2, '2.50 TB' ), 48 // Petabytes 48 // Petabytes. 49 49 array( (string) 1024 * TB_IN_BYTES, 2, '1.00 PB' ), 50 50 array( PB_IN_BYTES, 0, '1 PB' ), 51 51 array( 2.5 * PB_IN_BYTES, 0, '3 PB' ), 52 52 array( 2.5 * PB_IN_BYTES, 2, '2.50 PB' ), 53 // Exabytes 53 // Exabytes. 54 54 array( (string) 1024 * PB_IN_BYTES, 2, '1.00 EB' ), 55 55 array( EB_IN_BYTES, 0, '1 EB' ), 56 56 array( 2.5 * EB_IN_BYTES, 0, '3 EB' ), 57 57 array( 2.5 * EB_IN_BYTES, 2, '2.50 EB' ), 58 // Zettabytes 58 // Zettabytes. 59 59 array( (string) 1024 * EB_IN_BYTES, 2, '1.00 ZB' ), 60 60 array( ZB_IN_BYTES, 0, '1 ZB' ), 61 61 array( 2.5 * ZB_IN_BYTES, 0, '3 ZB' ), 62 62 array( 2.5 * ZB_IN_BYTES, 2, '2.50 ZB' ), 63 // Yottabytes 63 // Yottabytes. 64 64 array( (string) 1024 * ZB_IN_BYTES, 2, '1.00 YB' ), 65 65 array( YB_IN_BYTES, 0, '1 YB' ), 66 66 array( 2.5 * YB_IN_BYTES, 0, '3 YB' ), 67 67 array( 2.5 * YB_IN_BYTES, 2, '2.50 YB' ), 68 // Edge values 68 // Edge values. 69 69 array( TB_IN_BYTES + ( TB_IN_BYTES / 2 ) + MB_IN_BYTES, 1, '1.5 TB' ), 70 70 array( TB_IN_BYTES - MB_IN_BYTES - KB_IN_BYTES, 3, '1,023.999 GB' ),
Note: See TracChangeset
for help on using the changeset viewer.