function CommonSizeTestCase::testCommonParseSizeFormatSize
Cross-test parse_size() and format_size().
File
-
modules/
simpletest/ tests/ common.test, line 677
Class
- CommonSizeTestCase
- Tests file size parsing and formatting functions.
Code
function testCommonParseSizeFormatSize() {
foreach ($this->exact_test_cases as $size) {
$this->assertEqual($size, $parsed_size = parse_size($string = format_size($size, NULL)), $size . ' == ' . $parsed_size . ' (' . $string . ')');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.