UnitTestCase('test_utf8_ucwords ()'); } function testUcword() { $str = 'iñtërnâtiônàlizætiøn'; $ucwords = 'Iñtërnâtiônàlizætiøn'; $this->assertEqual(utf8_ucwords($str),$ucwords); } function testUcwords() { $str = 'iñt ërn âti ônà liz æti øn'; $ucwords = 'Iñt Ërn Âti Ônà Liz Æti Øn'; $this->assertEqual(utf8_ucwords($str),$ucwords); } function testUcwordsNewline() { $str = "iñt ërn âti\n ônà liz æti øn"; $ucwords = "Iñt Ërn Âti\n Ônà Liz Æti Øn"; $this->assertEqual(utf8_ucwords($str),$ucwords); } function testEmptyString() { $str = ''; $ucwords = ''; $this->assertEqual(utf8_ucwords($str),$ucwords); } function testOneChar() { $str = 'ñ'; $ucwords = 'Ñ'; $this->assertEqual(utf8_ucwords($str),$ucwords); } function testLinefeed() { $str = "iñt ërn âti\n ônà liz æti øn"; $ucwords = "Iñt Ërn Âti\n Ônà Liz Æti Øn"; $this->assertEqual(utf8_ucwords($str),$ucwords); } } //-------------------------------------------------------------------- /** * @package utf8 * @subpackage Tests */ if (!defined('TEST_RUNNING')) { define('TEST_RUNNING', true); $test = &new test_utf8_ucwords (); $reporter = & getTestReporter(); $test->run($reporter); }