You are here

public function ScaldBaseTestCase::testScaldUninstall in Scald: Media Management made easy 7

Test the uninstall process.

File

tests/scald.test, line 237
Tests for scald.module.

Class

ScaldBaseTestCase
Test the Scald base functionality.

Code

public function testScaldUninstall() {
  module_enable(array(
    'scald_audio',
  ));
  $web_user = $this
    ->drupalcreateuser(array(
    'administer modules',
  ));
  $this
    ->drupallogin($web_user);

  // Disable, then uninstall all Scald modules.
  $this
    ->drupalPost('admin/modules', array(
    'modules[Scald Providers][scald_audio][enable]' => FALSE,
  ), t('Save configuration'));
  $this
    ->drupalPost(NULL, array(
    'modules[Scald][scald][enable]' => FALSE,
  ), t('Save configuration'));
  $this
    ->clickLink(t('Uninstall'));
  $this
    ->drupalPost(NULL, array(
    'uninstall[scald_audio]' => 1,
  ), t('Uninstall'));
  $this
    ->drupalPost(NULL, array(), t('Uninstall'));
  $this
    ->assertText(t('The selected modules have been uninstalled.'), t('Scald Audio has been uninstalled.'));
}