File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -1048,7 +1048,7 @@ public function testAutomaticIdentifierGeneration(): void
10481048 $ this ->assertInstanceOf (Variable::class, $ node ->getName ());
10491049 }
10501050
1051- public function testCall (): void
1051+ public function testCallCallable (): void
10521052 {
10531053 $ node = Query::node ('X ' )->named ('y ' );
10541054 $ query = Query::new ()->match ($ node )
@@ -1062,6 +1062,22 @@ public function testCall(): void
10621062 $ this ->assertEquals ("MATCH (y:X) CALL { WITH y WHERE y.z = 'foo' RETURN y.z AS foo } RETURN foo " , $ query ->toQuery ());
10631063 }
10641064
1065+ public function testCallClause (): void {
1066+
1067+ $ node = Query::node ('X ' )->named ('y ' );
1068+
1069+ $ sub = Query::new ()->with ($ node ->getVariable ())
1070+ ->where ($ node ->property ('z ' )->equals (Query::literal ('foo ' ), false ))
1071+ ->returning ($ node ->property ('z ' )->alias ('foo ' ));
1072+
1073+ $ query = Query::new ()
1074+ ->match ($ node )
1075+ ->call ($ sub )
1076+ ->returning (Query::variable ('foo ' ));
1077+
1078+ $ this ->assertEquals ("MATCH (y:X) CALL { WITH y WHERE y.z = 'foo' RETURN y.z AS foo } RETURN foo " , $ query ->toQuery ());
1079+ }
1080+
10651081 public function provideLiteralData (): array
10661082 {
10671083 return [
You can’t perform that action at this time.
0 commit comments