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
1048
1048
$ this ->assertInstanceOf (Variable::class, $ node ->getName ());
1049
1049
}
1050
1050
1051
- public function testCall (): void
1051
+ public function testCallCallable (): void
1052
1052
{
1053
1053
$ node = Query::node ('X ' )->named ('y ' );
1054
1054
$ query = Query::new ()->match ($ node )
@@ -1062,6 +1062,22 @@ public function testCall(): void
1062
1062
$ this ->assertEquals ("MATCH (y:X) CALL { WITH y WHERE y.z = 'foo' RETURN y.z AS foo } RETURN foo " , $ query ->toQuery ());
1063
1063
}
1064
1064
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
+
1065
1081
public function provideLiteralData (): array
1066
1082
{
1067
1083
return [
You can’t perform that action at this time.
0 commit comments