$info = json_decode( $rbody, true );
if ( $info === null || !isset( $info['node']['nodes'] ) ) {
- return [ null, $rcode, "Unexpected JSON response; missing 'nodes' list.", false ];
+ return [ null, "Unexpected JSON response; missing 'nodes' list.", false ];
}
$config = [];
public static function provideFetchFromServer() {
return [
- [
+ '200 OK - Empty' => [
'http' => [
'code' => 200,
'reason' => 'OK',
- 'headers' => [
- 'content-length' => 0,
- ],
+ 'headers' => [ 'content-length' => 0 ],
'body' => '',
'error' => '(curl error: no status set)',
],
'expect' => [
- // FIXME: Returning 4 values instead of 3
- null,
- 200,
+ null, // data
"Unexpected JSON response; missing 'nodes' list.",
- false
+ false // retry
],
],
];