1 filetransfer.test FileTransferTest::_buildFakeModule()

File

core/modules/simpletest/tests/filetransfer.test, line 34

Class

FileTransferTest

Code

function _buildFakeModule() {
  $location = 'temporary://fake';
  if (is_dir($location)) {
    $ret = 0;
    $output = array();
    exec('rm -Rf ' . escapeshellarg($location), $output, $ret);
    if ($ret != 0) {
      throw new Exception('Error removing fake module directory.');
    }
  }

  $files = $this->_getFakeModuleFiles();
  $this->_writeDirectory($location, $files);
  return $location;
}