public function SizeTest::testCommonFormatSize in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/KernelTests/Core/Common/SizeTest.php \Drupal\KernelTests\Core\Common\SizeTest::testCommonFormatSize()
Checks that format_size() returns the expected string.
@dataProvider providerTestCommonFormatSize
File
- core/
tests/ Drupal/ KernelTests/ Core/ Common/ SizeTest.php, line 21
Class
- SizeTest
- Parse a predefined amount of bytes and compare the output with the expected value.
Namespace
Drupal\KernelTests\Core\CommonCode
public function testCommonFormatSize($expected, $input) {
$size = format_size($input, NULL);
$this
->assertEquals($expected, $size);
}