You are here

function FileTranferTest::_buildFakeModule in SimpleTest 7

1 call to FileTranferTest::_buildFakeModule()
FileTranferTest::testJail in tests/filetransfer.test

File

tests/filetransfer.test, line 37

Class

FileTranferTest

Code

function _buildFakeModule() {
  $location = file_directory_path('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;
}