3 * @version $Id: utf8_strrev.test.php,v 1.2 2006/02/25 14:52:18 harryf Exp $
8 //--------------------------------------------------------------------
14 require_once(dirname(__FILE__).'/../config.php');
15 require_once UTF8 . '/strrev.php';
17 //--------------------------------------------------------------------
22 class test_utf8_strrev extends UnitTestCase {
24 function test_utf8_strrev() {
25 $this->UnitTestCase('utf8_strrev()');
28 function testReverse() {
29 $str = 'Iñtërnâtiônàlizætiøn';
30 $rev = 'nøitæzilànôitânrëtñI';
31 $this->assertEqual(utf8_strrev($str),$rev);
34 function testEmptyStr() {
37 $this->assertEqual(utf8_strrev($str),$rev);
40 function testLinefeed() {
41 $str = "Iñtërnâtiôn\nàlizætiøn";
42 $rev = "nøitæzilà\nnôitânrëtñI";
43 $this->assertEqual(utf8_strrev($str),$rev);
48 //--------------------------------------------------------------------
53 if (!defined('TEST_RUNNING')) {
54 define('TEST_RUNNING', true);
55 $test = &new test_utf8_strrev();
56 $reporter = & getTestReporter();
57 $test->run($reporter);