File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ final class HttpHelper
49
49
*/
50
50
public static function interpretResponse (ResponseInterface $ response ): stdClass
51
51
{
52
- if ($ response ->getStatusCode () >= 400 ) {
52
+ if ($ response ->getStatusCode () >= 500 ) {
53
53
throw new RuntimeException ('HTTP Error: ' .$ response ->getReasonPhrase ());
54
54
}
55
55
Original file line number Diff line number Diff line change @@ -104,6 +104,10 @@ public function testAvailableAfter(): void
104
104
105
105
public function testDateTime (): void
106
106
{
107
+ if (str_starts_with ($ _ENV ['CONNECTION ' ] ?? '' , 'http ' )) {
108
+ $ this ->markTestSkipped ('http does not support datetime conversion ' );
109
+ }
110
+
107
111
$ dt = new DateTimeImmutable ();
108
112
$ ls = $ this ->getSession ()->run ('RETURN $x AS x ' , ['x ' => $ dt ])->first ()->get ('x ' );
109
113
Original file line number Diff line number Diff line change @@ -226,10 +226,15 @@ public function testCommitInvalid(): void
226
226
$ exception = null ;
227
227
try {
228
228
$ tsx ->commit ();
229
- } catch (ClientException $ e ) {
229
+ } catch (ClientException | Neo4jException $ e ) {
230
230
$ exception = $ e ;
231
231
}
232
- self ::assertTrue ($ exception instanceof ClientException);
232
+
233
+ if (str_starts_with ($ _ENV ['CONNECTION ' ] ?? '' , 'http ' )) {
234
+ self ::assertTrue ($ exception instanceof Neo4jException);
235
+ } else {
236
+ self ::assertTrue ($ exception instanceof ClientException);
237
+ }
233
238
234
239
self ::assertTrue ($ tsx ->isFinished ());
235
240
self ::assertFalse ($ tsx ->isRolledBack ());
@@ -259,10 +264,15 @@ public function testRollbackInvalid(): void
259
264
$ exception = null ;
260
265
try {
261
266
$ tsx ->rollback ();
262
- } catch (ClientException $ e ) {
267
+ } catch (ClientException | Neo4jException $ e ) {
263
268
$ exception = $ e ;
264
269
}
265
- self ::assertTrue ($ exception instanceof ClientException);
270
+
271
+ if (str_starts_with ($ _ENV ['CONNECTION ' ] ?? '' , 'http ' )) {
272
+ self ::assertTrue ($ exception instanceof Neo4jException);
273
+ } else {
274
+ self ::assertTrue ($ exception instanceof ClientException);
275
+ }
266
276
267
277
self ::assertTrue ($ tsx ->isFinished ());
268
278
self ::assertTrue ($ tsx ->isRolledBack ());
You can’t perform that action at this time.
0 commit comments