function NumberTest::testConversions
Tests the alphadecimal conversion functions.
@legacy-covers ::intToAlphadecimal @legacy-covers ::alphadecimalToInt
Attributes
#[DataProvider('providerTestConversions')]
Parameters
int $value: The integer value.
string $expected: The expected alphadecimal value.
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ NumberTest.php, line 137
Class
- NumberTest
- Tests number manipulation utilities.
Namespace
Drupal\Tests\Component\UtilityCode
public function testConversions($value, $expected) : void {
$this->assertSame(Number::intToAlphadecimal($value), $expected);
$this->assertSame($value, Number::alphadecimalToInt($expected));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.