summaryrefslogtreecommitdiff
path: root/modules/system/system.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/system.test')
-rw-r--r--modules/system/system.test22
1 files changed, 11 insertions, 11 deletions
diff --git a/modules/system/system.test b/modules/system/system.test
index b12867175..ba33835e2 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -400,41 +400,41 @@ class CronRunTestCase extends DrupalWebTestCase {
// Temporary file that is older than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
$temp_old = file_save_data('');
- db_update('files')
+ db_update('file')
->fields(array(
'status' => 0,
'timestamp' => 1,
))
->condition('fid', $temp_old->fid)
->execute();
- $this->assertTrue(file_exists($temp_old->filepath), t('Old temp file was created correctly.'));
+ $this->assertTrue(file_exists($temp_old->uri), t('Old temp file was created correctly.'));
// Temporary file that is less than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
$temp_new = file_save_data('');
- db_update('files')
+ db_update('file')
->fields(array('status' => 0))
->condition('fid', $temp_new->fid)
->execute();
- $this->assertTrue(file_exists($temp_new->filepath), t('New temp file was created correctly.'));
+ $this->assertTrue(file_exists($temp_new->uri), t('New temp file was created correctly.'));
// Permanent file that is older than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
$perm_old = file_save_data('');
- db_update('files')
+ db_update('file')
->fields(array('timestamp' => 1))
->condition('fid', $temp_old->fid)
->execute();
- $this->assertTrue(file_exists($perm_old->filepath), t('Old permanent file was created correctly.'));
+ $this->assertTrue(file_exists($perm_old->uri), t('Old permanent file was created correctly.'));
// Permanent file that is newer than DRUPAL_MAXIMUM_TEMP_FILE_AGE.
$perm_new = file_save_data('');
- $this->assertTrue(file_exists($perm_new->filepath), t('New permanent file was created correctly.'));
+ $this->assertTrue(file_exists($perm_new->uri), t('New permanent file was created correctly.'));
// Run cron and then ensure that only the old, temp file was deleted.
$this->assertTrue(drupal_cron_run(), t('Cron ran successfully.'));
- $this->assertFalse(file_exists($temp_old->filepath), t('Old temp file was correctly removed.'));
- $this->assertTrue(file_exists($temp_new->filepath), t('New temp file was correctly ignored.'));
- $this->assertTrue(file_exists($perm_old->filepath), t('Old permanent file was correctly ignored.'));
- $this->assertTrue(file_exists($perm_new->filepath), t('New permanent file was correctly ignored.'));
+ $this->assertFalse(file_exists($temp_old->uri), t('Old temp file was correctly removed.'));
+ $this->assertTrue(file_exists($temp_new->uri), t('New temp file was correctly ignored.'));
+ $this->assertTrue(file_exists($perm_old->uri), t('Old permanent file was correctly ignored.'));
+ $this->assertTrue(file_exists($perm_new->uri), t('New permanent file was correctly ignored.'));
}
}