55use Neo4j \QueryAPI \OGM ;
66use PHPUnit \Framework \TestCase ;
77
8- final class Neo4jOGMTest extends TestCase
8+ /**
9+ * @api
10+ */
11+ class Neo4jOGMTest extends TestCase
912{
13+ /** @psalm-suppress PropertyNotSetInConstructor */
1014 private OGM $ ogm ;
1115
1216 #[\Override]
@@ -31,9 +35,9 @@ public function testWithNode(): void
3135 $ this ->assertEquals ('Ayush ' , $ node ->getProperties ()['name ' ]['_value ' ]);
3236 }
3337
34-
3538 public function testWithSimpleRelationship (): void
3639 {
40+
3741 $ relationshipData = [
3842 '$type ' => 'Relationship ' ,
3943 '_value ' => [
@@ -43,10 +47,9 @@ public function testWithSimpleRelationship(): void
4347 ];
4448
4549 $ relationship = $ this ->ogm ->map ($ relationshipData );
46- $ this ->assertEquals ('FRIENDS ' , $ relationship ->getType () );
50+ $ this ->assertEquals ('FRIENDS ' , $ relationship ->type );
4751 }
4852
49- // More tests...
5053 public function testWithPath (): void
5154 {
5255 $ pathData = [
@@ -82,10 +85,10 @@ public function testWithPath(): void
8285
8386 $ path = $ this ->ogm ->map ($ pathData );
8487
85- $ this ->assertCount (2 , $ path ->getNodes () );
86- $ this ->assertCount (1 , $ path ->getRelationships () );
87- $ this ->assertEquals ('A ' , $ path ->getNodes () [0 ]->getProperties ()['name ' ]['_value ' ]);
88- $ this ->assertEquals ('B ' , $ path ->getNodes () [1 ]->getProperties ()['name ' ]['_value ' ]);
88+ $ this ->assertCount (2 , $ path ->nodes );
89+ $ this ->assertCount (1 , $ path ->relationships );
90+ $ this ->assertEquals ('A ' , $ path ->nodes [0 ]->getProperties ()['name ' ]['_value ' ]);
91+ $ this ->assertEquals ('B ' , $ path ->nodes [1 ]->getProperties ()['name ' ]['_value ' ]);
8992 }
9093
9194}
0 commit comments