|
10 | 10 | use Mockery\Mock; |
11 | 11 | use NinjaMutex\Lock\FlockLock; |
12 | 12 | use NinjaMutex\Lock\MemcachedLock; |
13 | | -use NinjaMutex\Lock\MySqlLock; |
| 13 | +use NinjaMutex\Lock\MySQLPDOLock; |
14 | 14 | use NinjaMutex\Lock\PhpRedisLock; |
15 | 15 | use NinjaMutex\Lock\PredisRedisLock; |
16 | 16 | use Predis\Client as PredisClient; |
@@ -65,11 +65,14 @@ public function it_supports_mysql_strategy() |
65 | 65 | $this->command->expects('getMutexStrategy')->andReturn('mysql'); |
66 | 66 |
|
67 | 67 | $mutex = new Mutex($this->command); |
68 | | - $expectedLock = new MySqlLock( |
| 68 | + $expectedLock = new MySqlPdoLock( |
| 69 | + 'mysql:' . implode(';', [ |
| 70 | + 'host=' . config('database.connections.mysql.host'), |
| 71 | + 'port=' . config('database.connections.mysql.port', 3306), |
| 72 | + ]), |
69 | 73 | config('database.connections.mysql.username'), |
70 | 74 | config('database.connections.mysql.password'), |
71 | | - config('database.connections.mysql.host'), |
72 | | - config('database.connections.mysql.port', 3306) |
| 75 | + config('database.connections.mysql.options') |
73 | 76 | ); |
74 | 77 | $this->assertEquals($expectedLock, $mutex->getNinjaMutexLock()); |
75 | 78 | } |
|
0 commit comments