createMock(ITempManager::class); $this->path = sys_get_temp_dir(); $tempManager->method('getTempBaseDir')->willReturn($this->path); $this->sequence = new FileSequence($tempManager); } public function tearDown():void { $lockDirectory = $this->path . '/' . FileSequence::LOCK_FILE_DIRECTORY; foreach (glob($lockDirectory . '/*') as $file) { unlink($file); } rmdir($lockDirectory); } }