@@ -433,7 +433,6 @@ public function testWithString(): void
433433 */
434434 public function testWithArray (): void
435435 {
436- // Expected result
437436 $ expected = new ResultSet (
438437 [
439438 new ResultRow (['n.name ' => 'bob1 ' ]),
@@ -448,42 +447,16 @@ public function testWithArray(): void
448447 new Bookmarks ([])
449448 );
450449
451- // Actual results from API
452450 $ results = $ this ->api ->run (
453451 'MATCH (n:Person) WHERE n.name IN $names RETURN n.name ' ,
454452 ['names ' => ['bob1 ' , 'alicy ' ]]
455453 );
456454
457- // Assert counters
458455 $ this ->assertEquals ($ expected ->getQueryCounters (), $ results ->getQueryCounters ());
459-
460- // Compare ResultRows
461- $ this ->assertCount (count ($ expected ), $ results );
462-
463- $ expectedRows = iterator_to_array ($ expected );
464- $ actualRows = iterator_to_array ($ results );
465-
466- $ this ->assertCount (count ($ expectedRows ), $ actualRows );
467-
468- // Ensure all expected rows are present in actual results
469- foreach ($ expectedRows as $ expectedRow ) {
470- $ found = false ;
471- foreach ($ actualRows as $ actualRow ) {
472- if ($ expectedRow == $ actualRow ) {
473- $ found = true ;
474- break ;
475- }
476- }
477- $ this ->assertTrue ($ found , "Expected row not found: " . json_encode ($ expectedRow ));
478- }
479-
480- // Check bookmarks count
456+ $ this ->assertEquals (iterator_to_array ($ expected ), iterator_to_array ($ results ));
481457 $ this ->assertCount (1 , $ results ->getBookmarks ());
482458 }
483459
484-
485-
486-
487460 public function testWithDate (): void
488461 {
489462 $ expected = new ResultSet (
0 commit comments