Skip to content

Commit 7c06265

Browse files
committed
changed query for consistent path behaviour
1 parent 2c2bf77 commit 7c06265

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/Integration/OGMFormatterIntegrationTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,12 @@ public function testPath(string $alias): void
440440
*/
441441
public function testPath2(string $alias): void
442442
{
443-
$results = $this->client->run(<<<'CYPHER'
444-
MERGE (a:Node {x:$x}) - [b:HasNode {attribute: $xy}] -> (c:Node {y:$y}) - [d:HasNode {attribute: $yz}] -> (e:Node {z:$z})
445-
RETURN (a) - [b] - (c) - [d] - (e) AS path
446-
CYPHER
447-
, ['x' => 'x', 'xy' => 'xy', 'y' => 'y', 'yz' => 'yz', 'z' => 'z'], $alias);
443+
$statement = <<<'CYPHER'
444+
CREATE path = ((a:Node {x:$x}) - [b:HasNode {attribute: $xy}] -> (c:Node {y:$y}) - [d:HasNode {attribute: $yz}] -> (e:Node {z:$z}))
445+
RETURN path
446+
CYPHER;
447+
448+
$results = $this->client->run($statement, ['x' => 'x', 'xy' => 'xy', 'y' => 'y', 'yz' => 'yz', 'z' => 'z'], $alias);
448449

449450
self::assertEquals(1, $results->count());
450451
$path = $results->first()->get('path');

0 commit comments

Comments
 (0)