retrievalAssertHelper example


  public function queryResultTest($iter$expected_results) {
    $this->assertSameSize($expected_results$iter, 'Number of results match');
    $count = 0;
    foreach ($iter as $data_row) {
      $expected_row = $expected_results[$count];
      $count++;
      foreach ($expected_row as $key => $expected_value) {
        $this->retrievalAssertHelper($expected_value$this->getValue($data_row$key)sprintf('Value matches for key "%s"', $key));
      }
    }
    $this->assertSame(count($expected_results)$count);
  }

  /** * Gets the value on a row for a given key. * * @param array $row * The row information. * @param string $key * The key identifier. * * @return mixed * The value on a row for a given key. */
Home | Imprint | This part of the site doesn't use cookies.