@@ -30,10 +30,23 @@ abstract class EnvironmentAwareIntegrationTest extends TestCase
30
30
/** @var ClientInterface<T> */
31
31
protected ClientInterface $ client ;
32
32
33
+ /**
34
+ * @psalm-suppress InternalMethod
35
+ */
33
36
protected function setUp (): void
34
37
{
35
38
parent ::setUp ();
36
39
$ this ->client = $ this ->createClient ();
40
+ // if ($this->usesDataProvider()) {
41
+ // $data = $this->getProvidedData();
42
+ // /** @var string|null */
43
+ // $alias = $data[0] ?? null;
44
+ // $this->client->run('MATCH (x) DETACH DELETE (x)', [], $alias);
45
+ // } else {
46
+ // foreach ($this->connectionAliases() as $alias) {
47
+ // $this->client->run('MATCH (x) DETACH DELETE (x)', [], $alias[0]);
48
+ // }
49
+ // }
37
50
}
38
51
39
52
/**
@@ -49,21 +62,13 @@ protected function createClient(): ClientInterface
49
62
$ connections = $ this ->getConnections ();
50
63
51
64
$ builder = ClientBuilder::create ();
52
- $ aliases = [];
53
65
foreach ($ connections as $ i => $ connection ) {
54
66
$ uri = Uri::create ($ connection );
55
67
$ alias = $ uri ->getScheme ().'_ ' .$ i ;
56
- $ aliases [] = $ alias ;
57
68
$ builder = $ builder ->withDriver ($ alias , $ connection );
58
69
}
59
70
60
- $ client = $ builder ->withFormatter ($ this ->formatter ())->build ();
61
-
62
- foreach ($ aliases as $ alias ) {
63
- $ client ->run ('MATCH (x) DETACH DELETE x ' , [], $ alias );
64
- }
65
-
66
- return $ client ;
71
+ return $ builder ->withFormatter ($ this ->formatter ())->build ();
67
72
}
68
73
69
74
/**
0 commit comments