function SizeUnitTest::testCommonParseSizeFormatSize

Cross-tests parse_size() and format_size().

File

drupal/core/modules/system/lib/Drupal/system/Tests/Common/SizeUnitTest.php, line 101
Definition of Drupal\system\Tests\Common\SizeUnitTest.

Class

SizeUnitTest
Tests file size parsing and formatting functions.

Namespace

Drupal\system\Tests\Common

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 . ')');
  }
}