public function UnicodeTest::providerStrtoupper

Data provider for testStrtoupper().

Return value

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

See also

testStrtoupper()

File

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

Class

UnicodeTest
Test unicode handling features implemented in Unicode component.

Namespace

Drupal\Tests\Component\Utility

Code

public function providerStrtoupper() {
  $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;
}