diff --git a/feeds.info b/feeds.info index b0b6905287031518365c87a8d7eedf1d0613a7a3..b568755d2ad5f6bcbbfbb23e5acd60e173c23170 100644 --- a/feeds.info +++ b/feeds.info @@ -1,10 +1,11 @@ name = Feeds description = Aggregates RSS/Atom/RDF feeds, imports CSV files and more. package = Feeds +core = 7.x + dependencies[] = ctools dependencies[] = job_scheduler -files[] = feeds.module -files[] = feeds.install + files[] = includes/FeedsConfigurable.inc files[] = includes/FeedsImporter.inc files[] = includes/FeedsSource.inc @@ -28,5 +29,3 @@ files[] = views/feeds_views_handler_field_log_message.inc files[] = views/feeds_views_handler_field_severity.inc files[] = views/feeds_views_handler_field_source.inc files[] = views/feeds_views_handler_filter_severity.inc -core = 7.x -php = 5.2 diff --git a/plugins/FeedsUserProcessor.inc b/plugins/FeedsUserProcessor.inc index 0b229d211fe02be9462a19ef84b17a434b5eed87..2335880e3cbb30222928813dc4449491cf52f364 100644 --- a/plugins/FeedsUserProcessor.inc +++ b/plugins/FeedsUserProcessor.inc @@ -166,6 +166,10 @@ class FeedsUserProcessor extends FeedsProcessor { 'name' => t('Created date'), 'description' => t('The created (e. g. joined) data of the user.'), ), + 'pass' => array( + 'name' => t('Unencrypted Password'), + 'description' => t('The unencrypted user password.'), + ), ); if (module_exists('openid')) { $targets['openid'] = array( diff --git a/tests/feeds.test b/tests/feeds.test index 9798f583f24d563002d2f105143c83b6b0efef3d..11f30cd0e2980edae6ccb21381f3f6718dd61a9d 100644 --- a/tests/feeds.test +++ b/tests/feeds.test @@ -16,28 +16,29 @@ class FeedsWebTestCase extends DrupalWebTestCase { * please don't pass duplicates of what is defined below! */ function setUp() { - // We ensure the taxonomy module is enabled first to prevent issues later - // on where plugins aren't available. - parent::setUp(array('taxonomy')); - $modules = array( - 'image', - 'file', - 'field', - 'field_ui', - 'ctools', - 'job_scheduler', - 'feeds', - 'feeds_ui', - ); $args = func_get_args(); - if (!empty($args[0]) && is_array($args[0])) { - foreach ($args[0] as $m) { - $modules[] = $m; - } + if (isset($args[0]) && is_array($args[0])) { + $modules = $args[0]; + } + elseif (count($args) > 1) { + $modules = $args; } - module_enable($modules, TRUE); - $this->resetAll(); + else { + $modules = array(); + } + + $modules[] = 'taxonomy'; + $modules[] = 'image'; + $modules[] = 'file'; + $modules[] = 'field'; + $modules[] = 'field_ui'; + $modules[] = 'feeds'; + $modules[] = 'feeds_ui'; + $modules[] = 'ctools'; + $modules[] = 'job_scheduler'; + $modules = array_unique($modules); + parent::setUp($modules); // Add text formats Directly. $filtered_html_format = array( @@ -78,6 +79,7 @@ class FeedsWebTestCase extends DrupalWebTestCase { 'administer nodes', 'administer content types', 'bypass node access', + 'administer users', )); $this->drupalLogin($this->admin_user); diff --git a/tests/feeds/users.csv b/tests/feeds/users.csv index f0a68149cf3edf2e1b0aa040bc848084d2172e4a..aede81cabb8c729f8717f9b617296c46acea5073 100644 --- a/tests/feeds/users.csv +++ b/tests/feeds/users.csv @@ -1,6 +1,6 @@ -name,mail,since -Morticia,morticia@example.com,1244347500 -Fester,fester@example.com,1241865600 -Gomez,gomez@example.com,1228572000 -Wednesday,wednesdayexample.com,1228347137 -Pugsley,pugsley@example.com,1228260225 \ No newline at end of file +name,mail,since,password +Morticia,morticia@example.com,1244347500,mort +Fester,fester@example.com,1241865600,fest +Gomez,gomez@example.com,1228572000,gome +Wednesday,wednesdayexample.com,1228347137,wedn +Pugsley,pugsley@example,1228260225,pugs diff --git a/tests/feeds_processor_user.test b/tests/feeds_processor_user.test index 3272b999a1f3b0b0004d12fdfab6eaffdb82f916..324625be4457bdf0534ba373c8d8ce5b464ebfbe 100644 --- a/tests/feeds_processor_user.test +++ b/tests/feeds_processor_user.test @@ -9,7 +9,6 @@ * Test aggregating a feed as data records. */ class FeedsCSVtoUsersTest extends FeedsWebTestCase { - public static function getInfo() { return array( 'name' => 'CSV import to users', @@ -18,22 +17,10 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase { ); } - /** - * Set up test. - */ - public function setUp() { - parent::setUp(); - $this->drupalLogin($this->drupalCreateUser(array( - 'administer feeds', - 'administer users', - ))); - } - /** * Test node creation, refreshing/deleting feeds and feed items. */ public function test() { - // Create an importer. $this->createImporterConfiguration('User import', 'user_import'); @@ -59,6 +46,11 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase { 'target' => 'created', 'unique' => FALSE, ), + '3' => array( + 'source' => 'password', + 'target' => 'pass', + 'unique' => 0, + ), ); $this->addMappings('user_import', $mappings); @@ -96,5 +88,11 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase { $this->assertEqual($count, 0, t('No imported user was assigned the administrator role.')); // @todo Test status setting, update existing and role settings. + + // Attempt to log in as one of the imported users. + $account = user_load_by_name('Morticia'); + $this->assertTrue($account, 'Imported user account loaded.'); + $account->pass_raw = 'mort'; + $this->drupalLogin($account); } }