public getLogFilePath ( ) : string | null | ||
리턴 | string | null |
public function getLogFilePath()
{
$path = $this->getSanitisedLogFilePath();
// for backwards compatibility on old logs
if (!file_exists($path)) {
$path = $this->getRawFilePath();
if (!file_exists($path)) {
return null;
}
}
return $path;
}
public function testLogDoesntExistMessage() { $log = new DeploynautLogFile('SomeSortOf Filename (UAT).log', $this->basePath); $this->assertNull($log->getLogFilePath()); $this->assertEquals('Log has not been created yet.', $log->content()); }