You are here

public function CCKSelectOtherTest::tearDown in CCK Select Other 6

Same name and namespace in other branches
  1. 7.2 tests/cck_select_other.test \CCKSelectOtherTest::tearDown()
  2. 7 tests/cck_select_other.test \CCKSelectOtherTest::tearDown()

Implementation of tearDown() method.

Overrides DrupalWebTestCase::tearDown

File

tests/cck_select_other.test, line 139
test file for cck_select_other Testing file

Class

CCKSelectOtherTest
SimpleTest class for cck_select_other

Code

public function tearDown() {

  // Delete test node.
  $this
    ->drupalPost('node/' . $this->test_node->nid . '/delete', array(
    'confirm' => 1,
  ), 'Delete');
  $this->test_node = NULL;
  content_field_instance_delete($this->test_field['field_name'], 'page', TRUE);
  $this->test_field = NULL;
  $info = _content_type_info(TRUE);
  $this
    ->assertNull(content_fields($this->new_field['field_name'], 'page'), t('Field %field no longer exists in the database.', array(
    '%field' => $this->new_field['field_name'],
  )));

  // Get rid of our options too.
  $this->options = NULL;
  $this->admin_user = NULL;
  parent::tearDown();
}