determineRootPath() . "ads-txt-orig.txt"; } private function origAdsTxtFileName() { return $this->determineRootPath() . "ads.txt"; } public function SetupSolution() { //Do we have an ads.txt file? rename the file to ads-txt-orig.txt //Get path to cache folder and insert out htaccess file or modify current htaccess file $filePath = $this->origAdsTxtFileName(); $newFilePath = $this->modifiedAdsTxtFileName(); if(empty($filePath) || !file_exists($filePath)) { return; } $renameSuccess = rename($filePath, $newFilePath); } public function TearDownSolution() { //Do we have an ads-txt-orig.txt file? restore that to ads.txt $modifiedFilePath = $this->modifiedAdsTxtFileName(); $origFilePath = $this->origAdsTxtFileName(); if(empty($modifiedFilePath ) || !file_exists($modifiedFilePath )) { return; } $renameSuccess = rename($modifiedFilePath , $origFilePath); } }