public function __construct()
{
$lockPath = $this->getLockPath();
$this->lockPathAndFilename = $lockPath . md5(FLOW_PATH_ROOT) . '_Flow.lock';
$this->lockFlagPathAndFilename = $lockPath . md5(FLOW_PATH_ROOT) . '_FlowIsLocked';
$this->removeExpiredLock();
}
/** * @test */ public function constructorRemovesExpiredLockFiles() { $this->mockLockFlagFile->lastModified(time() - (LockManager::LOCKFILE_MAXIMUM_AGE + 1)); $this->assertFileExists($this->mockLockFile->url()); $this->assertFileExists($this->mockLockFlagFile->url()); $this->lockManager->__construct(); $this->assertFileNotExists($this->mockLockFile->url()); $this->assertFileNotExists($this->mockLockFlagFile->url()); }