22
33namespace Neo4j \QueryAPI \Tests \Integration ;
44
5+ use GuzzleHttp \Exception \GuzzleException ;
56use Neo4j \QueryAPI \Neo4jQueryAPI ;
67use PHPUnit \Framework \Attributes \DataProvider ;
78use PHPUnit \Framework \TestCase ;
89
910class Neo4jQueryAPIIntegrationTest extends TestCase
1011{
1112
13+ /**
14+ * @throws GuzzleException
15+ */
1216 public static function setUpBeforeClass (): void
1317 {
1418 $ api = Neo4jQueryAPI::login (
@@ -30,29 +34,44 @@ public static function setUpBeforeClass(): void
3034 self ::validateFixtures ($ api );
3135 }
3236
37+ /**
38+ * @throws GuzzleException
39+ */
3340 private static function clearDatabase (Neo4jQueryAPI $ api ): void
3441 {
3542 $ api ->run ('MATCH (n) DETACH DELETE n ' ,[]);
3643 }
3744
45+ /**
46+ * @throws GuzzleException
47+ */
3848 private static function createConstraints (Neo4jQueryAPI $ api ): void
3949 {
4050 $ api ->run ('CREATE CONSTRAINT IF NOT EXISTS FOR (p:Person1) REQUIRE p.name IS UNIQUE ' ,[]);
4151 }
4252
53+ /**
54+ * @throws GuzzleException
55+ */
4356 private static function populateFixtures (Neo4jQueryAPI $ api , array $ names ): void
4457 {
4558 foreach ($ names as $ name ) {
4659 $ api ->run ('CREATE (:Person {name: $name}) ' , ['name ' => $ name ]);
4760 }
4861 }
4962
63+ /**
64+ * @throws GuzzleException
65+ */
5066 private static function validateFixtures (Neo4jQueryAPI $ api ): void
5167 {
5268 $ results = $ api ->run ('MATCH (p:Person) RETURN p.name ' ,[]);
5369 print_r ($ results );
5470 }
5571
72+ /**
73+ * @throws GuzzleException
74+ */
5675 #[DataProvider(methodName: 'queryProvider ' )]
5776 public function testRunSuccessWithParameters (
5877 string $ address ,
0 commit comments