FileMutex::className(), 'mutexPath' => '@yiiunit/runtime/mutex', ]); } /** * @dataProvider mutexDataProvider() * * @param string $mutexName * @throws InvalidConfigException */ public function testDeleteLockFile($mutexName) { $mutex = $this->createMutex(); $fileName = $mutex->mutexPath . '/' . md5($mutexName) . '.lock'; $mutex->acquire($mutexName); $this->assertFileExists($fileName); $mutex->release($mutexName); $this->assertFileNotExists($fileName); } }