function FileFieldTestCase::removeNodeFile in FileField 6.3
Remove a file from a node.
Note that if replacing a file, it must first be removed then added again.
File
- tests/
filefield.test, line 131
Class
Code
function removeNodeFile($nid, $new_revision = TRUE) {
$edit = array(
'revision' => (string) (int) $new_revision,
);
$this
->drupalPost('node/' . $nid . '/edit', array(), t('Remove'));
$this
->drupalPost(NULL, $edit, t('Save'));
}