function UnicodeUnitTest::helperTestStrToUpper

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

File

drupal-7.x/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)));
  }
}