You are here

protected function UbercartFileTestCase::uploadTestFile in Ubercart 7.3

Helper function to upload test file for downloading.

1 call to UbercartFileTestCase::uploadTestFile()
UbercartFileTestCase::testFilePurchaseCheckout in uc_file/tests/uc_file.test

File

uc_file/tests/uc_file.test, line 95
File download product feature tests.

Class

UbercartFileTestCase
Tests the file download purchase functionality.

Code

protected function uploadTestFile() {
  $filename = 'README.txt';

  // Use the Ubercart README.txt because we know it will always be there
  // and we know in advance how big it is.
  copy(drupal_get_path('module', 'uc_file') . '/../' . $filename, 'sites/default/files/file-downloads/README.txt');
  return $filename;
}