You are here

function UnicodeUnitTest::helperTestStrToUpper in Drupal 7

2 calls to UnicodeUnitTest::helperTestStrToUpper()
UnicodeUnitTest::testEmulatedUnicode in modules/simpletest/tests/unicode.test
Test emulated unicode features.
UnicodeUnitTest::testMbStringUnicode in modules/simpletest/tests/unicode.test
Test full unicode features implemented using the mbstring extension.

File

modules/simpletest/tests/unicode.test, line 87
Various unicode handling tests.

Class

UnicodeUnitTest
Test unicode handling features implemented in unicode.inc.

Code

function helperTestStrToUpper() {
  $testcase = array(
    'tHe QUIcK bRoWn' => 'THE QUICK BROWN',
    'FrançAIS is ÜBER-åwesome' => 'FRANÇAIS IS ÜBER-ÅWESOME',
  );
  if ($this->extendedMode) {
    $testcase['αβγδεζηθικλμνξοσὠ'] = 'ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΣὨ';
  }
  foreach ($testcase as $input => $output) {
    $this
      ->assertEqual(drupal_strtoupper($input), $output, format_string('%input is uppercased as %output', array(
      '%input' => $input,
      '%output' => $output,
    )));
  }
}