@@ -30,10 +30,23 @@ abstract class EnvironmentAwareIntegrationTest extends TestCase
3030 /** @var ClientInterface<T> */
3131 protected ClientInterface $ client ;
3232
33+ /**
34+ * @psalm-suppress InternalMethod
35+ */
3336 protected function setUp (): void
3437 {
3538 parent ::setUp ();
3639 $ 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+ // }
3750 }
3851
3952 /**
@@ -49,21 +62,13 @@ protected function createClient(): ClientInterface
4962 $ connections = $ this ->getConnections ();
5063
5164 $ builder = ClientBuilder::create ();
52- $ aliases = [];
5365 foreach ($ connections as $ i => $ connection ) {
5466 $ uri = Uri::create ($ connection );
5567 $ alias = $ uri ->getScheme ().'_ ' .$ i ;
56- $ aliases [] = $ alias ;
5768 $ builder = $ builder ->withDriver ($ alias , $ connection );
5869 }
5970
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 ();
6772 }
6873
6974 /**
0 commit comments