/**
  * @unit
  * @expectedException RuntimeException
  */
 public function testMkdirDeepThrowsExceptionIfDirectoryCreationFails()
 {
     if (!tx_rnbase_util_TYPO3::isTYPO60OrHigher()) {
         $this->markTestSkipped('Runtime Exception is not thrown before TYPO3 6.x');
     }
     tx_rnbase_util_Files::mkdir_deep('http://localhost');
 }
 /**
  * creates a lock file and stores the current time.
  *
  * @return boolean
  */
 private function createLockFile()
 {
     $fileName = $this->getFile();
     if (!is_dir(dirname($fileName))) {
         tx_rnbase_util_Files::mkdir_deep(dirname($fileName));
     }
     file_put_contents($fileName, time());
     if (!is_readable($fileName)) {
         tx_rnbase::load('tx_rnbase_util_Logger');
         tx_rnbase_util_Logger::warn('Lock file could not be created for "' . $this->getName() . '" process!', 'rn_base', array('process_name' => $this->getName(), 'life_time' => $this->getLifeTime(), 'lock_file' => $fileName));
         return FALSE;
     }
     return TRUE;
 }