You are here

public function BmTestUpdate7310::submitSchedule in Backup and Migrate 7.3

Submits the schedule form.

Parameters

string $name: The name of the destination.

string $machine_name: The machine name of the destination.

string $destination_id: The destination ID to use.

string $copy_destination_id: The destination ID to use for an optional copy.

1 call to BmTestUpdate7310::submitSchedule()
BmTestUpdate7310::testUpdate7310 in tests/BmTestUpdate7310.test
Test update 7310.

File

tests/BmTestUpdate7310.test, line 126
Test module updates.

Class

BmTestUpdate7310
Test module update 7310.

Code

public function submitSchedule($name, $machine_name, $destination_id, $copy_destination_id = NULL) {
  $this
    ->drupalGet('admin/config/system/backup_migrate/schedule/add');
  $this
    ->assertResponse(200);
  $edit = array();
  $edit['name'] = $name;
  $edit['machine_name'] = $machine_name;
  $edit['destination_id'] = $destination_id;
  if (!empty($copy_destination_id)) {
    $edit['copy'] = TRUE;
    $edit['copy_destination_id'] = $copy_destination_id;
  }
  $this
    ->drupalPost(NULL, $edit, t('Save schedule'));
  $this
    ->assertResponse(200);
}