File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 21
21
use Bolt \protocol \V4_4 ;
22
22
use function count ;
23
23
use Exception ;
24
- use Laudis \Neo4j \Authentication \Authenticate ;
25
24
use Laudis \Neo4j \Bolt \BoltConnectionPool ;
26
25
use Laudis \Neo4j \Common \Uri ;
27
26
use Laudis \Neo4j \Contracts \AuthenticateInterface ;
@@ -81,8 +80,6 @@ public function acquire(
81
80
82
81
$ server = $ this ->getNextServer ($ table , $ config ->getAccessMode ()) ?? $ uri ;
83
82
84
- $ authenticate = Authenticate::fromUrl ($ uri );
85
-
86
83
if ($ server ->getScheme () === '' ) {
87
84
$ server = $ server ->withScheme ($ uri ->getScheme ());
88
85
}
Original file line number Diff line number Diff line change 15
15
16
16
use function count ;
17
17
use InvalidArgumentException ;
18
+ use Laudis \Neo4j \Authentication \Authenticate ;
19
+ use Laudis \Neo4j \Basic \Driver ;
18
20
use Laudis \Neo4j \ClientBuilder ;
21
+ use Laudis \Neo4j \Common \Uri ;
19
22
use Laudis \Neo4j \Contracts \FormatterInterface ;
20
23
use Laudis \Neo4j \Contracts \TransactionInterface ;
21
24
use Laudis \Neo4j \Databags \Statement ;
@@ -37,6 +40,21 @@ protected static function formatter(): FormatterInterface
37
40
return OGMFormatter::create ();
38
41
}
39
42
43
+ public function testDifferentAuth (): void
44
+ {
45
+ foreach (self ::buildConnections () as $ connection ) {
46
+ $ uri = Uri::create ($ connection );
47
+
48
+ $ auth = Authenticate::fromUrl ($ uri );
49
+ $ uri = $ uri ->withUserInfo ('' );
50
+
51
+ $ driver = Driver::create ($ uri , null , $ auth );
52
+ self ::assertTrue ($ driver ->verifyConnectivity ());
53
+
54
+ self ::assertEquals (1 , $ driver ->createSession ()->run ('RETURN 1 AS one ' )->first ()->get ('one ' ));
55
+ }
56
+ }
57
+
40
58
public function testEqualEffect (): void
41
59
{
42
60
if (count ($ this ->connectionAliases ()) === 1 ) {
You can’t perform that action at this time.
0 commit comments