Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
email_registration
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
email_registration
Commits
e09959d9
Commit
e09959d9
authored
Jun 10, 2009
by
greggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
task
#485778
by greggles: simpletests for email registration
parent
9f9732ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
email_registration.test
email_registration.test
+52
-0
No files found.
email_registration.test
0 → 100644
View file @
e09959d9
<?php
class
EmailRegistrationTestCase
extends
DrupalWebTestCase
{
/**
* Implementation of getInfo().
*/
public
static
function
getInfo
()
{
return
array
(
'name'
=>
t
(
'Email registration.'
),
'description'
=>
t
(
'Test the email registration module.'
),
'group'
=>
t
(
'Email registration'
),
);
}
/**
* Implementation of setUp().
*/
function
setUp
()
{
parent
::
setUp
(
'email_registration'
);
// Configure to allow set password.
variable_set
(
'user_email_verification'
,
FALSE
);
}
/**
* Test various behaviors for anonymous users.
*/
function
testRegistration
()
{
// Try to register a user.
$name
=
$this
->
randomName
();
$pass
=
$this
->
randomName
(
10
);
$register
=
array
(
'mail'
=>
$name
.
'@example.com'
,
'pass[pass1]'
=>
$pass
,
'pass[pass2]'
=>
$pass
,
);
$this
->
drupalPost
(
'/user/register'
,
$register
,
t
(
'Create new account'
));
$login
=
array
(
'name'
=>
$name
.
'@example.com'
,
'pass'
=>
$pass
,
);
$this
->
drupalPost
(
'user/login'
,
$login
,
t
(
'Log in'
));
$this
->
assertRaw
(
'<h2>'
.
$name
.
'</h2>'
,
t
(
'User properly created, logged in.'
));
// $this->assertRaw('id="edit-name" size="60" value="'. $register['given_name'] .'"', t('Given name saved.'));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment