File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
tests/Elasticsearch/Tests Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -397,7 +397,14 @@ public function checkForWarnings($expectedWarnings) {
397
397
if ($ expectedWarnings !== null ) {
398
398
if (isset ($ last ['response ' ]['headers ' ]['Warning ' ]) === true ) {
399
399
foreach ($ last ['response ' ]['headers ' ]['Warning ' ] as $ warning ) {
400
- $ position = array_search ($ warning , $ expectedWarnings );
400
+ //$position = array_search($warning, $expectedWarnings);
401
+ $ position = false ;
402
+ foreach ($ expectedWarnings as $ index => $ value ) {
403
+ if (stristr ($ warning , $ value ) !== false ) {
404
+ $ position = $ index ;
405
+ break ;
406
+ }
407
+ }
401
408
if ($ position !== false ) {
402
409
// found the warning
403
410
unset($ expectedWarnings [$ position ]);
@@ -407,6 +414,7 @@ public function checkForWarnings($expectedWarnings) {
407
414
}
408
415
}
409
416
if (count ($ expectedWarnings ) > 0 ) {
417
+ print_r ($ last ['response ' ]);
410
418
throw new \Exception ("Expected to find more warnings: " . print_r ($ expectedWarnings , true ));
411
419
}
412
420
}
You can’t perform that action at this time.
0 commit comments