PhpBrew\Config::getTempFileDir PHP Method

getTempFileDir() public static method

public static getTempFileDir ( )
    public static function getTempFileDir()
    {
        $dir = self::getRoot() . DIRECTORY_SEPARATOR . 'tmp';
        if (!file_exists($dir)) {
            mkdir($dir, 0755, true);
        }
        return $dir;
    }

Usage Example

Example #1
0
 public function testDownloadByCurlCommand()
 {
     $downloader = new UrlDownloaderForTest($this->logger, new OptionResult());
     $downloader->setIsCurlCommandAvailable(true);
     $actualFilePath = tempnam(Config::getTempFileDir(), '');
     $downloader->download('http://httpbin.org/', $actualFilePath);
     $this->assertTrue($downloader->isCurlCommandAvailable());
     $this->assertFileExists($actualFilePath);
 }
All Usage Examples Of PhpBrew\Config::getTempFileDir