Changeset View
Changeset View
Standalone View
Standalone View
src/utils/__tests__/PhutilUtilsTestCase.php
Show First 20 Lines • Show All 532 Lines • ▼ Show 20 Lines | public function testPhutilJSONDecode() { | ||||
foreach ($invalid_cases as $input) { | foreach ($invalid_cases as $input) { | ||||
$caught = null; | $caught = null; | ||||
try { | try { | ||||
phutil_json_decode($input); | phutil_json_decode($input); | ||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
$caught = $ex; | $caught = $ex; | ||||
} | } | ||||
$this->assertTrue($caught instanceof PhutilJSONParserException); | $this->assertTrue($caught instanceof PhutilJSONParserException); | ||||
} | } | ||||
} | } | ||||
public function testPhutilINIDecode() { | public function testPhutilINIDecode() { | ||||
// Skip the test if we are using an older version of PHP that doesn't | // Skip the test if we are using an older version of PHP that doesn't | ||||
// have the `parse_ini_string` function. | // have the `parse_ini_string` function. | ||||
try { | try { | ||||
▲ Show 20 Lines • Show All 337 Lines • Show Last 20 Lines |