You are here

function DatePopupAuthoredTestCase::testVariableCleanupAfterNodeTypeRemoval in Date Popup Authored 7

Tests variable cleanup after a content type is removed.

File

tests/date_popup_authored_format.test, line 151
Simpletest case for Date Popup Authored.

Class

DatePopupAuthoredTestCase
Functionality tests for Date Popup Authored.

Code

function testVariableCleanupAfterNodeTypeRemoval() {
  $node_type_name = strtolower($this
    ->randomName(8) . '_test');
  $node_type = $this
    ->drupalCreateContentType(array(
    'name' => $node_type_name,
    'type' => $node_type_name,
  ));
  variable_set('date_popup_authored_enabled_' . $node_type_name, 'foo');
  variable_set('date_popup_authored_format_' . $node_type_name, 'foo');
  variable_set('date_popup_authored_year_range_' . $node_type_name, 'foo');
  node_type_delete($node_type_name);
  $this
    ->assertNull(variable_get('date_popup_authored_enabled_' . $node_type_name));
  $this
    ->assertNull(variable_get('date_popup_authored_format_' . $node_type_name));
  $this
    ->assertNull(variable_get('date_popup_authored_year_range_' . $node_type_name));
}