Skip to content

Commit a730caf

Browse files
committed
added tests for getters
1 parent e9daa84 commit a730caf

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/Unit/Patterns/PathTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,23 @@ public function testRelationshipLong(): void
5757
->named('a');
5858

5959
self::assertEquals('a = ()-[]-(:Label)-[]->(b)<-[c:TYPE {x: \'y\'}]-()-[]-(d)', $path->toQuery());
60+
61+
self::assertEquals([
62+
new Node(),
63+
new Node('Label'),
64+
(new Node())->named('b'),
65+
new Node(),
66+
(new Node())->named('d')
67+
], $path->getNodes());
68+
69+
self::assertEquals([
70+
new Relationship(Relationship::DIR_UNI),
71+
new Relationship(Relationship::DIR_RIGHT),
72+
(new Relationship(Relationship::DIR_LEFT))
73+
->withType('TYPE')
74+
->withProperties(['x' => Query::literal('y')])
75+
->named('c'),
76+
new Relationship(Relationship::DIR_UNI)
77+
], $path->getRelationships());
6078
}
6179
}

0 commit comments

Comments
 (0)