You are here

function UnicodeUnitTest::helperTestStrToUpper in SimpleTest 7

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

File

tests/unicode.test, line 85
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, t('%input is uppercased as %output', array(
      '%input' => $input,
      '%output' => $output,
    )));
  }
}