1.20.x unicode.test | UnicodeUnitTest::helperTestStrToUpper() |
File
- modules/
simpletest/ tests/ unicode.test, line 79 - 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(backdrop_strtoupper($input), $output, format_string('%input is uppercased as %output', array('%input' => $input, '%output' => $output)));
}
}