function BytesTest::testToInt

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/BytesTest.php \Drupal\Tests\Component\Utility\BytesTest::testToInt()

Tests \Drupal\Component\Utility\Bytes::toInt().

@dataProvider providerTestToInt @covers ::toInt

Parameters

int $size: The value for the size argument for \Drupal\Component\Utility\Bytes::toInt().

int $expected_int: The expected return value from \Drupal\Component\Utility\Bytes::toInt().

File

core/tests/Drupal/Tests/Component/Utility/BytesTest.php, line 30

Class

BytesTest
Tests bytes size parsing helper methods.

Namespace

Drupal\Tests\Component\Utility

Code

public function testToInt($size, $expected_int) {
    $this->assertEquals($expected_int, Bytes::toInt($size));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.