Differential D21457 Diff 51063 src/applications/nuance/github/__tests__/NuanceGitHubRawEventTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/nuance/github/__tests__/NuanceGitHubRawEventTestCase.php
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | foreach ($files as $file) { | ||||
'then an expected result section in JSON, with the two sections '. | 'then an expected result section in JSON, with the two sections '. | ||||
'separated by a line of "~~~~~", but the divider is not present '. | 'separated by a line of "~~~~~", but the divider is not present '. | ||||
'in the file.', | 'in the file.', | ||||
$file)); | $file)); | ||||
} else if (count($parts) > 2) { | } else if (count($parts) > 2) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Expected test file "%s" to contain exactly two sections, '. | 'Expected test file "%s" to contain exactly two sections, '. | ||||
'but it has more than two sections.')); | 'but it has more than two sections.', | ||||
$file)); | |||||
} | } | ||||
list($input, $expect) = $parts; | list($input, $expect) = $parts; | ||||
try { | try { | ||||
$input = phutil_json_decode($input); | $input = phutil_json_decode($input); | ||||
$expect = phutil_json_decode($expect); | $expect = phutil_json_decode($expect); | ||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
Show All 17 Lines |