public function NumberTest::testConversions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Utility/NumberTest.php \Drupal\Tests\Component\Utility\NumberTest::testConversions()
Tests the alphadecimal conversion functions.
@dataProvider providerTestConversions @covers ::intToAlphadecimal @covers ::alphadecimalToInt
Parameters
int $value: The integer value.
string $expected: The expected alphadecimal value.
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ NumberTest.php, line 136 - Contains \Drupal\Tests\Component\Utility\NumberTest.
Class
- NumberTest
- Tests number manipulation utilities.
Namespace
Drupal\Tests\Component\UtilityCode
public function testConversions($value, $expected) {
$this
->assertSame(Number::intToAlphadecimal($value), $expected);
$this
->assertSame($value, Number::alphadecimalToInt($expected));
}