original_string: public function responseIsSuccessfullyWithContainListResult(TableNode $table, $count = null)
      {
          $this->responseIsSuccessfully();
  
          $rpcResult = $this->response->getRpcResult();
  
          Assertions::assertTrue(is_array($rpcResult), sprintf(
              'The RPC response must be a array, but "%s" given.',
              gettype($rpcResult)
          ));
  
          if ($count !== null) {
              Assertions::assertCount((int) $count, $rpcResult, sprintf(
                  'The response should have %d elements, but %d given.',
                  $count,
                  count($rpcResult)
              ));
          }
  
          foreach($table->getHash() as $key => $row) {
              if (isset($row['__key__'])) {
                  $key = $row['__key__'];
                  unset ($row['__key__']);
              }
  
              Assertions::assertArrayHasKey($key, $rpcResult, sprintf(
                  'Not found data with key "%s" in array (%s).',
                  $key,
                  json_encode($rpcResult)
              ));
  
              $this->assertArrayEquals($rpcResult[$key], $row);
          }
      }
code: public function responseIsSuccessfullyWithContainListResult(TableNode $table, $count = null)
      {
          $this->responseIsSuccessfully();
  
          $rpcResult = $this->response->getRpcResult();
  
          Assertions::assertTrue(is_array($rpcResult), sprintf(
              'The RPC response must be a array, but "%s" given.',
              gettype($rpcResult)
          ));
  
          if ($count !== null) {
              Assertions::assertCount((int) $count, $rpcResult, sprintf(
                  'The response should have %d elements, but %d given.',
                  $count,
                  count($rpcResult)
              ));
          }
  
          foreach($table->getHash() as $key => $row) {
              if (isset($row['__key__'])) {
                  $key = $row['__key__'];
                  unset ($row['__key__']);
              }
  
              Assertions::assertArrayHasKey($key, $rpcResult, sprintf(
                  'Not found data with key "%s" in array (%s).',
                  $key,
                  json_encode($rpcResult)
              ));
  
              $this->assertArrayEquals($rpcResult[$key], $row);
          }
      }
code_tokens: public function responseIsSuccessfullyWithContainListResult ( TableNode $ table , $ count = null ) { $ this -> responseIsSuccessfully ( ) ; $ rpcResult = $ this -> response -> getRpcResult ( ) ; Assertions :: assertTrue ( is_array ( $ rpcResult ) , sprintf ( 'The RPC response must be a array, but "%s" given.' , gettype ( $ rpcResult ) ) ) ; if ( $ count !== null ) { Assertions :: assertCount ( ( int ) $ count , $ rpcResult , sprintf ( 'The response should have %d elements, but %d given.' , $ count , count ( $ rpcResult ) ) ) ; } foreach ( $ table -> getHash ( ) as $ key => $ row ) { if ( isset ( $ row [ '__key__' ] ) ) { $ key = $ row [ '__key__' ] ; unset ( $ row [ '__key__' ] ) ; } Assertions :: assertArrayHasKey ( $ key , $ rpcResult , sprintf ( 'Not found data with key "%s" in array (%s).' , $ key , json_encode ( $ rpcResult ) ) ) ; $ this -> assertArrayEquals ( $ rpcResult [ $ key ] , $ row ) ; } }
docstring: Check response successfully with list result
  
  @Then /^response is successfully with collection result:$/
  
  @param TableNode $table
  @param int       $count
docstring_tokens: Check response successfully with list result