You are here

protected function UbercartFileTestCase::configureDownloadDirectory in Ubercart 7.3

Helper function to configure Credit Card payment method settings.

1 call to UbercartFileTestCase::configureDownloadDirectory()
UbercartFileTestCase::setUp in uc_file/tests/uc_file.test
Overrides DrupalWebTestCase::setUp().

File

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

Class

UbercartFileTestCase
Tests the file download purchase functionality.

Code

protected function configureDownloadDirectory() {

  // Create directory for downloads, make it readable and writeable.
  // Putting this under sites/default/files because SimpleTest needs to be
  // able to create the directory - this is NOT where you'd put the downloads
  // directory on a live site.  On a live site, it should be outside the web root.
  drupal_mkdir('sites/default/files/file-downloads', 0755);
  $this
    ->drupalPost('admin/store/settings/products', array(
    'uc_file_base_dir' => 'sites/default/files/file-downloads',
  ), t('Save configuration'));
  $this
    ->assertFieldByName('uc_file_base_dir', 'sites/default/files/file-downloads', 'Download file path has been set.');
}