File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,11 @@ public function getStrategy()
33
33
34
34
switch ($ this ->command ->getMutexStrategy ()) {
35
35
case 'mysql ' :
36
- return new MySqlLock (env ('DB_USERNAME ' ), env ('DB_PASSWORD ' ), env ('DB_HOST ' ));
36
+ return new MySqlLock (
37
+ config ('database.connections.mysql.username ' ),
38
+ config ('database.connections.mysql.password ' ),
39
+ config ('database.connections.mysql.host ' )
40
+ );
37
41
38
42
case 'redis ' :
39
43
return new PredisRedisLock ($ this ->getRedisClient ());
Original file line number Diff line number Diff line change @@ -54,7 +54,11 @@ public function it_supports_mysql_strategy()
54
54
$ this ->command ->shouldReceive ('getMutexStrategy ' )->withNoArgs ()->once ()->andReturn ('mysql ' );
55
55
56
56
$ mutex = new Mutex ($ this ->command );
57
- $ expectedStrategy = new MySqlLock (env ('DB_USERNAME ' ), env ('DB_PASSWORD ' ), env ('DB_HOST ' ));
57
+ $ expectedStrategy = new MySqlLock (
58
+ config ('database.connections.mysql.username ' ),
59
+ config ('database.connections.mysql.password ' ),
60
+ config ('database.connections.mysql.host ' )
61
+ );
58
62
$ this ->assertEquals ($ expectedStrategy , $ mutex ->getStrategy ());
59
63
}
60
64
You can’t perform that action at this time.
0 commit comments