Skip to content

Commit

Permalink
Tests: Updated DoQuery
Browse files Browse the repository at this point in the history
The previous API_DoQuery response enhancement exposed some mistakes in the
DoQuery test
  - Removed leftover var_dump
  - Compare entire results set not just a subset
  • Loading branch information
tflanagan committed Oct 28, 2015
1 parent 0a76890 commit f1bdc79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions tests/API_DoQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@
'clist' => '1.2.3.4.5'
));

if(!objStrctMatch($actual['table']['records'], $expected['table']['records'])){
var_dump($actual['table']['records'], $expected['table']['records']);
if(!objStrctMatch($actual, $expected)){
throw new Exception('Mismatched API_DoQuery Formatted Data Structure');
}

Expand Down
6 changes: 1 addition & 5 deletions tests/runAll.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ function objStrctEquiv($a, $b){
$key = $keys[$i];
$val = $a[$key];

if(!isset($b[$key])){
return false;
}

if(!objStrctMatch($val, $b[$key])){
if(!isset($b[$key]) || !objStrctMatch($val, $b[$key])){
return false;
}
}
Expand Down

0 comments on commit f1bdc79

Please sign in to comment.