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()
3333
3434 switch ($ this ->command ->getMutexStrategy ()) {
3535 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+ );
3741
3842 case 'redis ' :
3943 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()
5454 $ this ->command ->shouldReceive ('getMutexStrategy ' )->withNoArgs ()->once ()->andReturn ('mysql ' );
5555
5656 $ 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+ );
5862 $ this ->assertEquals ($ expectedStrategy , $ mutex ->getStrategy ());
5963 }
6064
You can’t perform that action at this time.
0 commit comments