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