Skip to content
Snippets Groups Projects
Commit b9dd6a0e authored by Dave Reid's avatar Dave Reid
Browse files

Issue #914210 by jyee, Dave Reid: Added mapper for user raw password.

parent 59604038
No related branches found
No related tags found
No related merge requests found
name = Feeds name = Feeds
description = Aggregates RSS/Atom/RDF feeds, imports CSV files and more. description = Aggregates RSS/Atom/RDF feeds, imports CSV files and more.
package = Feeds package = Feeds
core = 7.x
dependencies[] = ctools dependencies[] = ctools
dependencies[] = job_scheduler dependencies[] = job_scheduler
files[] = feeds.module
files[] = feeds.install
files[] = includes/FeedsConfigurable.inc files[] = includes/FeedsConfigurable.inc
files[] = includes/FeedsImporter.inc files[] = includes/FeedsImporter.inc
files[] = includes/FeedsSource.inc files[] = includes/FeedsSource.inc
...@@ -28,5 +29,3 @@ files[] = views/feeds_views_handler_field_log_message.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_severity.inc
files[] = views/feeds_views_handler_field_source.inc files[] = views/feeds_views_handler_field_source.inc
files[] = views/feeds_views_handler_filter_severity.inc files[] = views/feeds_views_handler_filter_severity.inc
core = 7.x
php = 5.2
...@@ -166,6 +166,10 @@ class FeedsUserProcessor extends FeedsProcessor { ...@@ -166,6 +166,10 @@ class FeedsUserProcessor extends FeedsProcessor {
'name' => t('Created date'), 'name' => t('Created date'),
'description' => t('The created (e. g. joined) data of the user.'), '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')) { if (module_exists('openid')) {
$targets['openid'] = array( $targets['openid'] = array(
......
...@@ -16,28 +16,29 @@ class FeedsWebTestCase extends DrupalWebTestCase { ...@@ -16,28 +16,29 @@ class FeedsWebTestCase extends DrupalWebTestCase {
* please don't pass duplicates of what is defined below! * please don't pass duplicates of what is defined below!
*/ */
function setUp() { 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(); $args = func_get_args();
if (!empty($args[0]) && is_array($args[0])) { if (isset($args[0]) && is_array($args[0])) {
foreach ($args[0] as $m) { $modules = $args[0];
$modules[] = $m; }
} elseif (count($args) > 1) {
$modules = $args;
} }
module_enable($modules, TRUE); else {
$this->resetAll(); $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. // Add text formats Directly.
$filtered_html_format = array( $filtered_html_format = array(
...@@ -78,6 +79,7 @@ class FeedsWebTestCase extends DrupalWebTestCase { ...@@ -78,6 +79,7 @@ class FeedsWebTestCase extends DrupalWebTestCase {
'administer nodes', 'administer nodes',
'administer content types', 'administer content types',
'bypass node access', 'bypass node access',
'administer users',
)); ));
$this->drupalLogin($this->admin_user); $this->drupalLogin($this->admin_user);
......
name,mail,since name,mail,since,password
Morticia,morticia@example.com,1244347500 Morticia,morticia@example.com,1244347500,mort
Fester,fester@example.com,1241865600 Fester,fester@example.com,1241865600,fest
Gomez,gomez@example.com,1228572000 Gomez,gomez@example.com,1228572000,gome
Wednesday,wednesdayexample.com,1228347137 Wednesday,wednesdayexample.com,1228347137,wedn
Pugsley,pugsley@example.com,1228260225 Pugsley,pugsley@example,1228260225,pugs
\ No newline at end of file
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
* Test aggregating a feed as data records. * Test aggregating a feed as data records.
*/ */
class FeedsCSVtoUsersTest extends FeedsWebTestCase { class FeedsCSVtoUsersTest extends FeedsWebTestCase {
public static function getInfo() { public static function getInfo() {
return array( return array(
'name' => 'CSV import to users', 'name' => 'CSV import to users',
...@@ -18,22 +17,10 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase { ...@@ -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. * Test node creation, refreshing/deleting feeds and feed items.
*/ */
public function test() { public function test() {
// Create an importer. // Create an importer.
$this->createImporterConfiguration('User import', 'user_import'); $this->createImporterConfiguration('User import', 'user_import');
...@@ -59,6 +46,11 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase { ...@@ -59,6 +46,11 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase {
'target' => 'created', 'target' => 'created',
'unique' => FALSE, 'unique' => FALSE,
), ),
'3' => array(
'source' => 'password',
'target' => 'pass',
'unique' => 0,
),
); );
$this->addMappings('user_import', $mappings); $this->addMappings('user_import', $mappings);
...@@ -96,5 +88,11 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase { ...@@ -96,5 +88,11 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase {
$this->assertEqual($count, 0, t('No imported user was assigned the administrator role.')); $this->assertEqual($count, 0, t('No imported user was assigned the administrator role.'));
// @todo Test status setting, update existing and role settings. // @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);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment