function CommonSizeTestCase::testCommonFormatSize
Check that format_size() returns the expected string.
Archivo
- drupal-7.x/
modules/ simpletest/ tests/ common.test, line 468 - Tests for common.inc functionality.
Class
- CommonSizeTestCase
- Tests file size parsing and formatting functions.
Código
function testCommonFormatSize() {
foreach (array($this->exact_test_cases, $this->rounded_test_cases) as $test_cases) {
foreach ($test_cases as $expected => $input) {
$this->assertEqual(($result = format_size($input, NULL)), $expected, $expected . ' == ' . $result . ' (' . $input . ' bytes)');
}
}
}