Changeset View
Changeset View
Standalone View
Standalone View
src/utils/__tests__/PhutilUTF8TestCase.php
| Show First 20 Lines • Show All 818 Lines • ▼ Show 20 Lines | $this->assertEqual( | ||||
| 'en_GB.UTF-8', | 'en_GB.UTF-8', | ||||
| phutil_get_system_locale(), | phutil_get_system_locale(), | ||||
| pht('Set locale to en_GB.')); | pht('Set locale to en_GB.')); | ||||
| // Put things back the way they were. | // Put things back the way they were. | ||||
| phutil_set_system_locale($original_locale); | phutil_set_system_locale($original_locale); | ||||
| } | } | ||||
| public function testUTF8StringlikeObjects() { | |||||
| // See T13527. In some versions and configurations of PHP, passing an | |||||
| // object which implements "__toString()" to "mb_check_encoding()" could | |||||
| // fail. | |||||
| $any_stringlike_object = new PhutilURI('/'); | |||||
| $this->assertTrue(phutil_is_utf8($any_stringlike_object)); | |||||
| } | |||||
| } | } | ||||