function UnicodeUnitTest::helperTestStrLen

7.x unicode.test UnicodeUnitTest::helperTestStrLen()
2 calls to UnicodeUnitTest::helperTestStrLen()
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 117
Various unicode handling tests.

Class

UnicodeUnitTest
Test unicode handling features implemented in unicode.inc.

Code

function helperTestStrLen() {
  $testcase = array(
    'tHe QUIcK bRoWn' => 15,
    'ÜBER-åwesome' => 12,
  );

  foreach ($testcase as $input => $output) {
    $this->assertEqual(drupal_strlen($input), $output, format_string('%input length is %output', array('%input' => $input, '%output' => $output)));
  }
}