markTestSkipped('FileMutex does not have MS Windows operating system support.'); } } /** * @return FileMutex * @throws \yii\base\InvalidConfigException */ protected function createMutex() { return \Yii::createObject([ 'class' => FileMutex::className(), ]); } public function testDeleteLockFile() { $mutex = $this->createMutex(); $fileName = $mutex->mutexPath . '/' . md5(self::$mutexName) . '.lock'; $mutex->acquire(self::$mutexName); $this->assertFileExists($fileName); $mutex->release(self::$mutexName); $this->assertFileNotExists($fileName); } }