Skip to content

Commit 0db17d9

Browse files
committed
Added equality tests when runnint query over multiple connections
based on #31
1 parent 17566ad commit 0db17d9

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

docker/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,3 @@ services:
171171
- NEO4J_causalClustering_raftAdvertisedAddress=readreplica1:7000
172172
- NEO4J_causalClustering_initialDiscoveryMembers=core1:5000,core2:5000,core3:5000
173173
- NEO4J_dbms_connectors_default__advertised__address=readreplica1
174-

tests/Base/ClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
abstract class ClientTest extends TestCase
2222
{
23-
private ClientInterface $client;
23+
protected ClientInterface $client;
2424

2525
abstract public function createClient(): ClientInterface;
2626

tests/Integration/ClientIntegrationTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Ds\Vector;
1717
use Laudis\Neo4j\ClientBuilder;
1818
use Laudis\Neo4j\Contracts\ClientInterface;
19+
use Laudis\Neo4j\Databags\Statement;
1920
use Laudis\Neo4j\Network\Bolt\BoltInjections;
2021
use Laudis\Neo4j\Tests\Base\ClientTest;
2122

@@ -56,4 +57,20 @@ public function connectionAliases(): iterable
5657

5758
return $tbr;
5859
}
60+
61+
public function testEqualEffect(): void
62+
{
63+
$statement = new Statement(
64+
'merge(u:User{email: $email}) on create set u.uuid=$uuid return u',
65+
['email' => '[email protected]', 'uuid' => 'cc60fd69-a92b-47f3-9674-2f27f3437d66']
66+
);
67+
68+
foreach (['42', '41', '40', '35'] as $version) {
69+
$x = $this->client->runStatement($statement, 'bolt-'.$version);
70+
$y = $this->client->runStatement($statement, 'http-'.$version);
71+
72+
self::assertEquals($x, $y);
73+
self::assertEquals($x->toArray(), $y->toArray());
74+
}
75+
}
5976
}

0 commit comments

Comments
 (0)