public function FileFieldPathsUpdatesCase::testRetroEmpty in File (Field) Paths 7
Test behaviour of Retroactive updates when no updates are needed.
File
- tests/
filefield_paths.update.test, line 26 - Tests for the File (Field) Paths module.
Class
- FileFieldPathsUpdatesCase
- Class FileFieldPathsUpdatesCase
Code
public function testRetroEmpty() {
// Create a File field.
$field_name = drupal_strtolower($this
->randomName());
$this
->createFileField($field_name, $this->content_type);
// Trigger retroactive updates.
$edit = array(
'instance[settings][filefield_paths][retroactive_update]' => TRUE,
);
$this
->drupalPost("admin/structure/types/manage/{$this->content_type}/fields/{$field_name}", $edit, t('Save settings'));
// Ensure no errors are thrown.
$this
->assertNoText('Error', t('No errors were found.'));
}