You are here

public function BytesTest::testToInt in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 35
Contains \Drupal\Tests\Component\Utility\BytesTest.

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