public function theResponseShouldContainErrorData($id, $message, TableNode $table)
    {
        Assertions::assertEquals(200, $this->response->getStatusCode());

        $this->theResponseShouldContainErrorWithMessage($id, $message);
        $error = $this->getFieldFromBody('error', $this->response->getBody());

        Assertions::assertArrayHasKey('data', $error);
        Assertions::assertEquals($table->getRowsHash(), $error['data']);
    }
public function theResponseShouldContainErrorData($id, $message, TableNode $table)
    {
        Assertions::assertEquals(200, $this->response->getStatusCode());

        $this->theResponseShouldContainErrorWithMessage($id, $message);
        $error = $this->getFieldFromBody('error', $this->response->getBody());

        Assertions::assertArrayHasKey('data', $error);
        Assertions::assertEquals($table->getRowsHash(), $error['data']);
    }
public function theResponseShouldContainErrorData ( $ id , $ message , TableNode $ table ) { Assertions :: assertEquals ( 200 , $ this -> response -> getStatusCode ( ) ) ; $ this -> theResponseShouldContainErrorWithMessage ( $ id , $ message ) ; $ error = $ this -> getFieldFromBody ( 'error' , $ this -> response -> getBody ( ) ) ; Assertions :: assertArrayHasKey ( 'data' , $ error ) ; Assertions :: assertEquals ( $ table -> getRowsHash ( ) , $ error [ 'data' ] ) ; }
Check json-rpc error data

@param string|integer $id
@param string         $message
@param TableNode      $table

@Then /^(?:the )?response should be error with id "([^"]+)", message "(.+)", data:$/
Check json - rpc error data