function UnicodeUnitTest::helperTestStrToLower

2 calls to UnicodeUnitTest::helperTestStrToLower()
UnicodeUnitTest::testEmulatedUnicode in drupal/core/modules/system/lib/Drupal/system/Tests/System/UnicodeUnitTest.php
Test emulated unicode features.
UnicodeUnitTest::testMbStringUnicode in drupal/core/modules/system/lib/Drupal/system/Tests/System/UnicodeUnitTest.php
Test full unicode features implemented using the mbstring extension.

File

drupal/core/modules/system/lib/Drupal/system/Tests/System/UnicodeUnitTest.php, line 77
Definition of Drupal\system\Tests\System\UnicodeUnitTest.

Class

UnicodeUnitTest
Test unicode handling features implemented in unicode.inc.

Namespace

Drupal\system\Tests\System

Code

function helperTestStrToLower() {
  $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_strtolower($input), $output, format_string('%input is lowercased as %output', array(
      '%input' => $input,
      '%output' => $output,
    )));
  }
}