function ByteSizeMarkupTest::testCommonFormatSize
Same name and namespace in other branches
- 10 core/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php \Drupal\Tests\Core\StringTranslation\ByteSizeMarkupTest::testCommonFormatSize()
Tests common format size.
@legacy-covers ::create
Attributes
#[DataProvider('providerTestCommonFormatSize')]
File
-
core/
tests/ Drupal/ Tests/ Core/ StringTranslation/ ByteSizeMarkupTest.php, line 28
Class
Namespace
Drupal\Tests\Core\StringTranslationCode
public function testCommonFormatSize($expected, $input) : void {
$size = ByteSizeMarkup::create($input, NULL, $this->getStringTranslationStub());
$this->assertInstanceOf(TranslatableMarkup::class, $size);
$this->assertEquals($expected, $size);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.