$this->assertSame($str, core_text::strtoupper($str, 'GB18030'));
}
+ /**
+ * Test the strrev method.
+ */
+ public function test_strrev() {
+ $strings = array(
+ "Žluťoučký koníček" => "kečínok ýkčuoťulŽ",
+ 'ŽLUŤOUČKÝ KONÍČEK' => "KEČÍNOK ÝKČUOŤULŽ",
+ '言語設定' => '定設語言',
+ '简体中文' => '文中体简',
+ "Der eine stößt den Speer zum Mann" => "nnaM muz reepS ned tßöts enie reD"
+ );
+ foreach ($strings as $before => $after) {
+ // Make sure we can reverse it both ways and that it comes out the same.
+ $this->assertSame($after, core_text::strrev($before));
+ $this->assertSame($before, core_text::strrev($after));
+ // Reverse it twice to be doubly sure.
+ $this->assertSame($after, core_text::strrev(core_text::strrev($after)));
+ }
+ }
+
/**
* Tests the static strpos method.
*/