@@ -26,7 +26,7 @@ private function getBoltUri(): ?string
26
26
/** @var string|mixed $connections */
27
27
$ connections = $ _ENV ['NEO4J_CONNECTIONS ' ] ?? false ;
28
28
if (!is_string ($ connections )) {
29
- Dotenv::createImmutable (__DIR__ . '/../../ ' )->load ();
29
+ Dotenv::createImmutable (__DIR__ . '/../../ ' )->load ();
30
30
/** @var string|mixed $connections */
31
31
$ connections = $ _ENV ['NEO4J_CONNECTIONS ' ] ?? false ;
32
32
if (!is_string ($ connections )) {
@@ -45,35 +45,38 @@ private function getBoltUri(): ?string
45
45
46
46
public function testBoltSetupWithScheme (): void
47
47
{
48
- if ($ this ->getBoltUri () === null ) {
48
+ $ uri = $ this ->getBoltUri ();
49
+ if ($ uri === null ) {
49
50
self ::markTestSkipped ('No bolt uri provided ' );
50
51
}
51
52
52
- $ client = ClientBuilder::create ()->addBoltConnection ('bolt ' , $ this -> getBoltUri () )->build ();
53
+ $ client = ClientBuilder::create ()->addBoltConnection ('bolt ' , $ uri )->build ();
53
54
$ tsx = $ client ->beginTransaction ();
54
55
self ::assertTrue (true );
55
56
$ tsx ->rollback ();
56
57
}
57
58
58
59
public function testBoltSetupWithoutPort (): void
59
60
{
60
- if ($ this ->getBoltUri () === null ) {
61
+ $ uri = $ this ->getBoltUri ();
62
+ if ($ uri === null ) {
61
63
self ::markTestSkipped ('No bolt uri provided ' );
62
64
}
63
65
64
- $ client = ClientBuilder::create ()->addBoltConnection ('bolt ' , $ this -> getBoltUri () )->build ();
66
+ $ client = ClientBuilder::create ()->addBoltConnection ('bolt ' , $ uri )->build ();
65
67
$ tsx = $ client ->beginTransaction ();
66
68
self ::assertTrue (true );
67
69
$ tsx ->rollback ();
68
70
}
69
71
70
72
public function testBoltSetupWrongScheme (): void
71
73
{
72
- if ($ this ->getBoltUri () === null ) {
74
+ $ uri = $ this ->getBoltUri ();
75
+ if ($ uri === null ) {
73
76
self ::markTestSkipped ('No bolt uri provided ' );
74
77
}
75
78
76
- $ client = ClientBuilder::create ()->addBoltConnection ('bolt ' , $ this -> getBoltUri () )->build ();
79
+ $ client = ClientBuilder::create ()->addBoltConnection ('bolt ' , $ uri )->build ();
77
80
$ tsx = $ client ->beginTransaction ();
78
81
self ::assertTrue (true );
79
82
$ tsx ->rollback ();
0 commit comments