Conditions | 4 |
Paths | 8 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function setUp(): void |
||
21 | { |
||
22 | $host = getenv('PSQL_TEST_HOST'); |
||
23 | if (empty($host)) { |
||
24 | $host = "127.0.0.1"; |
||
25 | } |
||
26 | $password = getenv('PSQL_PASSWORD'); |
||
27 | if (empty($password)) { |
||
28 | $password = 'password'; |
||
29 | } |
||
30 | if ($password == '.') { |
||
31 | $password = ""; |
||
32 | } |
||
33 | |||
34 | $uri = "pgsql://postgres:{$password}@{$host}/migratedatabase"; |
||
35 | |||
36 | Migration::registerDatabase(PgsqlDatabase::class); |
||
37 | |||
38 | $this->migrate = new Migration(new Uri($uri), __DIR__ . '/../example/postgres', true, $this->migrationTable); |
||
39 | parent::setUp(); |
||
40 | } |
||
42 |