Changeset View
Changeset View
Standalone View
Standalone View
src/utils/__tests__/PhutilUTF8TestCase.php
| Show First 20 Lines • Show All 492 Lines • ▼ Show 20 Lines | public function testUTF8Convert() { | ||||
| $this->assertEqual($expect, $output, pht('Conversion from ISO-8859-1.')); | $this->assertEqual($expect, $output, pht('Conversion from ISO-8859-1.')); | ||||
| $caught = null; | $caught = null; | ||||
| try { | try { | ||||
| phutil_utf8_convert('xyz', 'moon language', 'UTF-8'); | phutil_utf8_convert('xyz', 'moon language', 'UTF-8'); | ||||
| } catch (Exception $ex) { | } catch (Exception $ex) { | ||||
| $caught = $ex; | $caught = $ex; | ||||
| } catch (Throwable $ex) { | |||||
| $caught = $ex; | |||||
| } | } | ||||
| $this->assertTrue((bool)$caught, pht('Conversion with bogus encoding.')); | $this->assertTrue((bool)$caught, pht('Conversion with bogus encoding.')); | ||||
| } | } | ||||
| public function testUTF8ucwords() { | public function testUTF8ucwords() { | ||||
| $tests = array( | $tests = array( | ||||
| ▲ Show 20 Lines • Show All 328 Lines • Show Last 20 Lines | |||||