Skip to content

Commit 331f748

Browse files
committed
wp
1 parent 3f8cb9d commit 331f748

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

tests/Integration/Neo4jQueryAPIIntegrationTest.php

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use PHPUnit\Framework\Attributes\DataProvider;
1414
use PHPUnit\Framework\TestCase;
1515
use Neo4j\QueryAPI\Transaction;
16-
use Psr\Http\Client\RequestExceptionInterface;
1716

1817
class Neo4jQueryAPIIntegrationTest extends TestCase
1918
{
@@ -427,13 +426,8 @@ public function testWithString(): void
427426
$this->assertCount(1, $results->getBookmarks());
428427
}
429428

430-
/**
431-
* @throws Neo4jException
432-
* @throws RequestExceptionInterface
433-
*/
434429
public function testWithArray(): void
435430
{
436-
// Expected result
437431
$expected = new ResultSet(
438432
[
439433
new ResultRow(['n.name' => 'bob1']),
@@ -448,32 +442,16 @@ public function testWithArray(): void
448442
new Bookmarks([])
449443
);
450444

451-
// Actual results from API
452445
$results = $this->api->run(
453446
'MATCH (n:Person) WHERE n.name IN $names RETURN n.name',
454447
['names' => ['bob1', 'alicy']]
455448
);
456449

457-
// Assert counters
458450
$this->assertEquals($expected->getQueryCounters(), $results->getQueryCounters());
459-
460-
// Assert the number of ResultRows
461-
$this->assertCount(count(iterator_to_array($expected)), iterator_to_array($results));
462-
463-
// Convert to arrays for comparison
464-
$expectedRows = iterator_to_array($expected);
465-
$actualRows = iterator_to_array($results);
466-
467-
// Ensure all expected rows are present in actual results
468-
foreach ($expectedRows as $expectedRow) {
469-
$this->assertContains($expectedRow, $actualRows, "Expected row not found: " . json_encode($expectedRow));
470-
}
471-
472-
// Check bookmarks count
451+
$this->assertEquals(iterator_to_array($expected), iterator_to_array($results));
473452
$this->assertCount(1, $results->getBookmarks());
474453
}
475454

476-
477455
public function testWithDate(): void
478456
{
479457
$expected = new ResultSet(

0 commit comments

Comments
 (0)