public function WebformTestCase::tearDown in Webform 7.4
Same name and namespace in other branches
- 6.3 tests/webform.test \WebformTestCase::tearDown()
- 6.2 tests/webform.test \WebformTestCase::tearDown()
- 7.3 tests/webform.test \WebformTestCase::tearDown()
Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix.
Overrides DrupalWebTestCase::tearDown
File
- tests/
WebformTestCase.test, line 79
Class
- WebformTestCase
- Webform module tests.
Code
public function tearDown() {
// Delete the webform admin and any created nodes.
foreach ($this->webform_users as $account) {
$uid = $account->uid;
$result = db_select('node')
->fields('node')
->condition('uid', $uid)
->execute();
foreach ($result as $node) {
node_delete($node->nid);
}
user_cancel(array(), $uid, 'user_cancel_delete');
}
parent::tearDown();
}