1.20.x unicode.test UnicodeUnitTest::testMbStringUnicode()

Test full unicode features implemented using the mbstring extension.

File

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

Class

UnicodeUnitTest
Test unicode handling features implemented in unicode.inc.

Code

function testMbStringUnicode() {
  global $multibyte;

  // mbstring was not detected on this installation, there is no way to test
  // multibyte features. Treat that as an exception.
  if ($multibyte == UNICODE_SINGLEBYTE) {
    $this->error(t('Unable to test Multibyte features: mbstring extension was not detected.'));
  }

  $multibyte = UNICODE_MULTIBYTE;

  $this->extendedMode = TRUE;
  $this->pass(t('Testing in mbstring mode'));

  $this->helperTestStrToLower();
  $this->helperTestStrToUpper();
  $this->helperTestUcFirst();
  $this->helperTestStrLen();
  $this->helperTestSubStr();
  $this->helperTestTruncate();
}