File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -691,6 +691,30 @@ public function testSkipClauseExample3(): void
691
691
$ this ->assertStringMatchesFormat ("MATCH (%s) RETURN %s.name ORDER BY %s.name SKIP (5 ^ 2) " , $ query );
692
692
}
693
693
694
+ public function testWhereClauseExample1 (): void
695
+ {
696
+ $ n = node ('Person ' );
697
+ $ query = query ()
698
+ ->match ($ n )
699
+ ->where ($ n ->property ('name ' )->equals ('Peter ' ))
700
+ ->returning ($ n )
701
+ ->build ();
702
+
703
+ $ this ->assertStringMatchesFormat ("MATCH (%s:Person) WHERE (%s.name = 'Peter') RETURN %s " , $ query );
704
+ }
705
+
706
+ public function testWhereClauseExample2 (): void
707
+ {
708
+ $ n = node ();
709
+ $ query = query ()
710
+ ->match ($ n )
711
+ ->where ($ n ->labeled ('Person ' ))
712
+ ->returning ($ n )
713
+ ->build ();
714
+
715
+ $ this ->assertStringMatchesFormat ("MATCH (%s) WHERE %s:Person RETURN %s " , $ query );
716
+ }
717
+
694
718
public function testCombiningClausesExample1 (): void
695
719
{
696
720
$ nineties = node ("Movie " );
You can’t perform that action at this time.
0 commit comments