You are here

public function NumberTest::providerTestConversions in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/Utility/NumberTest.php \Drupal\Tests\Component\Utility\NumberTest::providerTestConversions()
  2. 9 core/tests/Drupal/Tests/Component/Utility/NumberTest.php \Drupal\Tests\Component\Utility\NumberTest::providerTestConversions()

Data provider for testConversions().

Return value

array An array containing:

  • The integer value.
  • The alphadecimal value.

See also

testConversions()

File

core/tests/Drupal/Tests/Component/Utility/NumberTest.php, line 146

Class

NumberTest
Tests number manipulation utilities.

Namespace

Drupal\Tests\Component\Utility

Code

public function providerTestConversions() {
  return [
    [
      0,
      '00',
    ],
    [
      1,
      '01',
    ],
    [
      10,
      '0a',
    ],
    [
      20,
      '0k',
    ],
    [
      35,
      '0z',
    ],
    [
      36,
      '110',
    ],
    [
      100,
      '12s',
    ],
  ];
}