Skip to content

Commit ce4f6a7

Browse files
committed
Refactor Dsn class
1 parent 030512e commit ce4f6a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Support/TestTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ protected function getConnection(bool $fixture = false): PdoConnectionInterface
3636

3737
protected static function getDb(): PdoConnectionInterface
3838
{
39-
$dsn = (new Dsn('pgsql', '127.0.0.1', 'yiitest', '5432'))->asString();
39+
$dsn = (new Dsn(databaseName: 'yiitest'))->asString();
4040

4141
return new Connection(new Driver($dsn, 'root', 'root'), DbHelper::getSchemaCache());
4242
}
4343

4444
protected function getDsn(): string
4545
{
4646
if ($this->dsn === '') {
47-
$this->dsn = (new Dsn('pgsql', '127.0.0.1', 'yiitest', '5432'))->asString();
47+
$this->dsn = (new Dsn(databaseName: 'yiitest'))->asString();
4848
}
4949

5050
return $this->dsn;

0 commit comments

Comments
 (0)