diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-17 19:14:42 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-17 19:14:42 +0000 |
commit | b41323642bffd3761f73a8c9dc8260546d7533f1 (patch) | |
tree | 1a0530685d18eb01e0356fbed7de91aba00405e9 /modules/system/system.test | |
parent | 0138e3946ab2458ffb97066d4b8a0cd94d83e516 (diff) | |
download | brdo-b41323642bffd3761f73a8c9dc8260546d7533f1.tar.gz brdo-b41323642bffd3761f73a8c9dc8260546d7533f1.tar.bz2 |
#517814 by jmstacey, justinrandell, pwolanin, drewish, Jody Lynn, aaron, dopry, and c960657: Converted File API to stream wrappers, for enhanced private/public file handling, and the ability to reference other storage mechanisms such as s3:// and flicker://.
Diffstat (limited to 'modules/system/system.test')
-rw-r--r-- | modules/system/system.test | 22 |
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.')); } } |