t('FeedAPI file upload support'), 'description' => t('Tests to use a file upload for a feed instead of an URL.'), 'group' => t('FeedAPI'), ); } /** * Test the file upload form */ function testFileUploadAbility() { $this->create_type(array_pop($this->get_parsers()), TRUE); $settings = feedapi_get_settings($this->info->type); $this->feedapi_user(); $edit = array( 'files[feedapi]' => drupal_get_path('module', 'feedapi'). '/tests/files/feed', ); $this->drupalPost('node/add/'. $this->info->type, $edit, 'Save'); $this->assertText('drupal.org', 'The feed title is on the saved node.'); $status = db_result(db_query('SELECT status FROM {files}')); $this->assertEqual($status, FILE_STATUS_PERMANENT, 'The uploaded file is permanent'); } }