Skip to content

Commit f1bdc79

Browse files
committed
Tests: Updated DoQuery
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
1 parent 0a76890 commit f1bdc79

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

tests/API_DoQuery.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@
210210
'clist' => '1.2.3.4.5'
211211
));
212212

213-
if(!objStrctMatch($actual['table']['records'], $expected['table']['records'])){
214-
var_dump($actual['table']['records'], $expected['table']['records']);
213+
if(!objStrctMatch($actual, $expected)){
215214
throw new Exception('Mismatched API_DoQuery Formatted Data Structure');
216215
}
217216

tests/runAll.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,7 @@ function objStrctEquiv($a, $b){
7878
$key = $keys[$i];
7979
$val = $a[$key];
8080

81-
if(!isset($b[$key])){
82-
return false;
83-
}
84-
85-
if(!objStrctMatch($val, $b[$key])){
81+
if(!isset($b[$key]) || !objStrctMatch($val, $b[$key])){
8682
return false;
8783
}
8884
}

0 commit comments

Comments
 (0)