@@ -87,13 +87,8 @@ public function testValidRun(): void
87
87
88
88
public function testInvalidRun (): void
89
89
{
90
- $ exception = false ;
91
- try {
92
- $ this ->getSession ()->transaction (static fn (TransactionInterface $ tsx ) => $ tsx ->run ('MERGE (x:Tes0342hdm21.()) ' , ['test ' => 'a ' , 'otherTest ' => 'b ' ]));
93
- } catch (Neo4jException ) {
94
- $ exception = true ;
95
- }
96
- self ::assertTrue ($ exception );
90
+ $ this ->expectException (Neo4jException::class);
91
+ $ this ->getSession ()->transaction (static fn (TransactionInterface $ tsx ) => $ tsx ->run ('MERGE (x:Tes0342hdm21.()) ' , ['test ' => 'a ' , 'otherTest ' => 'b ' ]));
97
92
}
98
93
99
94
public function testInvalidRunRetry (): void
@@ -106,7 +101,8 @@ public function testInvalidRunRetry(): void
106
101
}
107
102
self ::assertTrue ($ exception );
108
103
109
- $ this ->getSession ()->run ('RETURN 1 AS one ' );
104
+ $ response = $ this ->getSession ()->run ('RETURN 1 AS one ' );
105
+ $ this ->assertEquals (1 , $ response ->first ()->get ('one ' ));
110
106
}
111
107
112
108
public function testValidStatement (): void
@@ -142,7 +138,7 @@ public function testStatements(): void
142
138
$ response = $ this ->getSession ()->runStatements ([
143
139
Statement::create ('MERGE (x:TestNode {test: $test}) ' , $ params ),
144
140
Statement::create ('MERGE (x:OtherTestNode {test: $otherTest}) ' , $ params ),
145
- Statement::create ('RETURN 1 AS x ' , [] ),
141
+ Statement::create ('RETURN 1 AS x ' ),
146
142
]);
147
143
148
144
self ::assertEquals (3 , $ response ->count ());
0 commit comments