DeploynautLogFile::getSanitisedLogFilePath PHP Method

getSanitisedLogFilePath() public method

Get the sanitised log path.
public getSanitisedLogFilePath ( ) : string
return string
    public function getSanitisedLogFilePath()
    {
        return $this->basePath . '/' . strtolower(FileNameFilter::create()->filter($this->logFile));
    }

Usage Example

 public function testLogFileNameSanitised()
 {
     $log = new DeploynautLogFile('SomeSortOf Filename (UAT).log', $this->basePath);
     $this->assertEquals($log->getSanitisedLogFilePath(), $this->basePath . '/somesortof-filename-uat.log');
     $log = new DeploynautLogFile('..SomeSortOf Filename_(UAT).log', $this->basePath);
     $this->assertEquals($log->getSanitisedLogFilePath(), $this->basePath . '/somesortof-filename-uat.log');
     $log = new DeploynautLogFile('test-project.1823.log', $this->basePath);
     $this->assertEquals($log->getSanitisedLogFilePath(), $this->basePath . '/test-project.1823.log');
 }