public function UnicodeTest::providerStrtolower

Data provider for testStrtolower().

Return value

array An array containing a string, its lowercase version and whether it should be processed as multibyte.

See also

testStrtolower()

File

drupal/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php, line 112
Contains \Drupal\Tests\Component\Utility\UnicodeTest.

Class

UnicodeTest
Test unicode handling features implemented in Unicode component.

Namespace

Drupal\Tests\Component\Utility

Code

public function providerStrtolower() {
  $cases = array(
    array(
      'tHe QUIcK bRoWn',
      'the quick brown',
    ),
    array(
      'FrançAIS is ÜBER-åwesome',
      'français is über-åwesome',
    ),
  );
  foreach ($cases as $case) {

    // Test the same string both in multibyte and singlebyte conditions.
    array_push($case, TRUE);
    $cases[] = $case;
  }

  // Add a multibyte string.
  $cases[] = array(
    'ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΣὨ',
    'αβγδεζηθικλμνξοσὠ',
    TRUE,
  );
  return $cases;
}