function ByteSizeMarkupTest::testCommonFormatSize

Same name in other branches
  1. 10 core/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php \Drupal\Tests\Core\StringTranslation\ByteSizeMarkupTest::testCommonFormatSize()

@covers ::create @dataProvider providerTestCommonFormatSize

File

core/tests/Drupal/Tests/Core/StringTranslation/ByteSizeMarkupTest.php, line 23

Class

ByteSizeMarkupTest
@coversDefaultClass \Drupal\Core\StringTranslation\ByteSizeMarkup @group StringTranslation

Namespace

Drupal\Tests\Core\StringTranslation

Code

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.