File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 88
88
version : composer
89
89
configuration : phpunit.xml
90
90
args : ' --testdox'
91
-
91
+ env :
92
+ SITES_DB_HOSTNAME : localhost
93
+ SITES_POSTGRES_HOSTNAME : localhost
94
+ SITES_REDIS_HOSTNAME : localhost
Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ public function setUp(): void
20
20
21
21
try {
22
22
$ cache = new PdbRedisCache ([
23
- 'host ' => Env:: isDocker () ? ' tcp://redis:6379 ' : 'localhost ' ,
23
+ 'host ' => getenv ( ' SITES_REDIS_HOSTNAME ' ) ? : 'localhost ' ,
24
24
'prefix ' => 'pdb: ' ,
25
25
]);
26
26
}
27
- catch (Exception $ e ) {
27
+ catch (\ Exception $ e ) {
28
28
$ this ->markTestSkipped ('Redis not available: ' . $ e ->getMessage ());
29
29
}
30
30
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public function setUp(): void
15
15
{
16
16
$ this ->pdb = Pdb::create ([
17
17
'type ' => PdbConfig::TYPE_PGSQL ,
18
- 'host ' => 'postgres ' ,
18
+ 'host ' => getenv ( ' SITES_POSTGRES_HOSTNAME ' ) ?: 'postgres ' ,
19
19
'user ' => 'postgres ' ,
20
20
'pass ' => 'password ' ,
21
21
'database ' => 'kbpdb ' ,
Original file line number Diff line number Diff line change 7
7
8
8
return [
9
9
'type ' => 'mysql ' ,
10
- 'host ' => '127.0.0.1 ' ,
10
+ 'host ' => getenv ( ' SITES_DB_HOSTNAME ' ) ?: '127.0.0.1 ' ,
11
11
'user ' => 'kbpdb ' ,
12
12
'pass ' => 'password ' ,
13
13
'database ' => 'kbpdb ' ,
You can’t perform that action at this time.
0 commit comments