Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
59dd17a6
Commit
59dd17a6
authored
13 years ago
by
Frank Febbraro
Browse files
Options
Downloads
Patches
Plain Diff
Fixed user unit test
parent
1a60aa12
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/feeds_processor_user.test
+3
-4
3 additions, 4 deletions
tests/feeds_processor_user.test
with
3 additions
and
4 deletions
tests/feeds_processor_user.test
+
3
−
4
View file @
59dd17a6
...
@@ -73,17 +73,16 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase {
...
@@ -73,17 +73,16 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase {
$this
->
importFile
(
'user_import'
,
$this
->
absolutePath
()
.
'/tests/feeds/users.csv'
);
$this
->
importFile
(
'user_import'
,
$this
->
absolutePath
()
.
'/tests/feeds/users.csv'
);
// Assert result.
// Assert result.
$this
->
assertText
(
'Created
4
users'
);
$this
->
assertText
(
'Created
3
users'
);
// 1 user has an invalid email address, all users should be assigned
// 1 user has an invalid email address, all users should be assigned
// the manager role.
// the manager role.
$this
->
assertText
(
'Failed importing
1
user'
);
$this
->
assertText
(
'Failed importing
2
user'
);
$this
->
drupalGet
(
'admin/people'
);
$this
->
drupalGet
(
'admin/people'
);
$this
->
assertText
(
'Morticia'
);
$this
->
assertText
(
'Morticia'
);
$this
->
assertText
(
'Fester'
);
$this
->
assertText
(
'Fester'
);
$this
->
assertText
(
'Gomez'
);
$this
->
assertText
(
'Gomez'
);
$this
->
assertText
(
'Pugsley'
);
$count
=
db_query
(
"SELECT count(*) FROM
{
users_roles
}
WHERE rid = :rid"
,
array
(
':rid'
=>
$manager_rid
))
->
fetchField
();
$count
=
db_query
(
"SELECT count(*) FROM
{
users_roles
}
WHERE rid = :rid"
,
array
(
':rid'
=>
$manager_rid
))
->
fetchField
();
$this
->
assertEqual
(
$count
,
4
,
t
(
'All imported users were assigned the manager role.'
));
$this
->
assertEqual
(
$count
,
3
,
t
(
'All imported users were assigned the manager role.'
));
$count
=
db_query
(
"SELECT count(*) FROM
{
users_roles
}
WHERE rid = :rid"
,
array
(
':rid'
=>
$admin_rid
))
->
fetchField
();
$count
=
db_query
(
"SELECT count(*) FROM
{
users_roles
}
WHERE rid = :rid"
,
array
(
':rid'
=>
$admin_rid
))
->
fetchField
();
$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.'
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment