]> projects.mako.cc - scuttle/blob - includes/utf8/tests/cases/utf8_strrev.test.php
updated gettext based on new strings
[scuttle] / includes / utf8 / tests / cases / utf8_strrev.test.php
1 <?php
2 /**
3 * @version $Id: utf8_strrev.test.php,v 1.2 2006/02/25 14:52:18 harryf Exp $
4 * @package utf8
5 * @subpackage Tests
6 */
7
8 //--------------------------------------------------------------------
9 /**
10 * Includes
11 * @package utf8
12 * @subpackage Tests
13 */
14 require_once(dirname(__FILE__).'/../config.php');
15 require_once UTF8 . '/strrev.php';
16
17 //--------------------------------------------------------------------
18 /**
19 * @package utf8
20 * @subpackage Tests
21 */
22 class test_utf8_strrev extends UnitTestCase {
23
24     function test_utf8_strrev() {
25         $this->UnitTestCase('utf8_strrev()');
26     }
27     
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);
32     }
33     
34     function testEmptyStr() {
35         $str = '';
36         $rev = '';
37         $this->assertEqual(utf8_strrev($str),$rev);
38     }
39     
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);
44     }
45     
46 }
47
48 //--------------------------------------------------------------------
49 /**
50 * @package utf8
51 * @subpackage Tests
52 */
53 if (!defined('TEST_RUNNING')) {
54     define('TEST_RUNNING', true);
55     $test = &new test_utf8_strrev();
56     $reporter = & getTestReporter();
57     $test->run($reporter);
58 }

Benjamin Mako Hill || Want to submit a patch?