@@ -48,7 +48,7 @@ function testRegisterUserWithEmailVerification() {
...
@@ -48,7 +48,7 @@ function testRegisterUserWithEmailVerification() {
->save();
->save();
// Tell openid_test.module to respond with these SREG fields.
// Tell openid_test.module to respond with these SREG fields.
variable_set('openid_test_response',array(
state()->set('openid_test.response',array(
'openid.sreg.nickname'=>'john',
'openid.sreg.nickname'=>'john',
'openid.sreg.email'=>'john@example.com',
'openid.sreg.email'=>'john@example.com',
'openid.sreg.language'=>'pt-BR',
'openid.sreg.language'=>'pt-BR',
...
@@ -107,7 +107,7 @@ function testRegisterUserWithoutEmailVerification() {
...
@@ -107,7 +107,7 @@ function testRegisterUserWithoutEmailVerification() {
->save();
->save();
// Tell openid_test.module to respond with these SREG fields.
// Tell openid_test.module to respond with these SREG fields.
variable_set('openid_test_response',array(
state()->set('openid_test.response',array(
'openid.sreg.nickname'=>'john',
'openid.sreg.nickname'=>'john',
'openid.sreg.email'=>'john@example.com',
'openid.sreg.email'=>'john@example.com',
'openid.sreg.language'=>'pt-BR',
'openid.sreg.language'=>'pt-BR',
...
@@ -150,7 +150,7 @@ function testRegisterUserWithInvalidSreg() {
...
@@ -150,7 +150,7 @@ function testRegisterUserWithInvalidSreg() {
// Tell openid_test.module to respond with these SREG fields.
// Tell openid_test.module to respond with these SREG fields.
$web_user=$this->drupalCreateUser(array());
$web_user=$this->drupalCreateUser(array());
variable_set('openid_test_response',array(
state()->set('openid_test.response',array(
'openid.sreg.nickname'=>$web_user->name,
'openid.sreg.nickname'=>$web_user->name,
'openid.sreg.email'=>'mail@invalid#',
'openid.sreg.email'=>'mail@invalid#',
'openid.sreg.timezone'=>'Foo/Bar',
'openid.sreg.timezone'=>'Foo/Bar',
...
@@ -164,11 +164,11 @@ function testRegisterUserWithInvalidSreg() {
...
@@ -164,11 +164,11 @@ function testRegisterUserWithInvalidSreg() {
$this->assertRaw(t('Account registration using the information provided by your OpenID provider failed due to the reasons listed below. Complete the registration by filling out the form below. If you already have an account, you can <a href="@login">log in</a> now and add your OpenID under "My account".',array('@login'=>url('user/login'))),'User was asked to complete the registration process manually.');
$this->assertRaw(t('Account registration using the information provided by your OpenID provider failed due to the reasons listed below. Complete the registration by filling out the form below. If you already have an account, you can <a href="@login">log in</a> now and add your OpenID under "My account".',array('@login'=>url('user/login'))),'User was asked to complete the registration process manually.');
$this->assertRaw(t('The name %name is already taken.',array('%name'=>$web_user->name)),'Form validation error for username was displayed.');
$this->assertRaw(t('The name %name is already taken.',array('%name'=>$web_user->name)),'Form validation error for username was displayed.');
$this->assertRaw(t('The e-mail address %mail is not valid.',array('%mail'=>'mail@invalid#')),'Form validation error for e-mail address was displayed.');
$this->assertRaw(t('The e-mail address %mail is not valid.',array('%mail'=>'mail@invalid#')),'Form validation error for e-mail address was displayed.');
$this->assertTrue(variable_get('openid_test_hook_openid_response_response'),'hook_openid_response() was invoked.');
$this->assertTrue(state()->get('openid_test.hook_openid_response_response'),'hook_openid_response() was invoked.');
$this->assertFalse(variable_get('openid_test_hook_openid_response_account',TRUE),'No user object passed to hook_openid_response().');
$this->assertFalse(state()->get('openid_test.hook_openid_response_account'),'No user object passed to hook_openid_response().');