本文整理汇总了PHP中frontend\models\SignupForm::sendAccountActivationEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP SignupForm::sendAccountActivationEmail方法的具体用法?PHP SignupForm::sendAccountActivationEmail怎么用?PHP SignupForm::sendAccountActivationEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类frontend\models\SignupForm
的用法示例。
在下文中一共展示了SignupForm::sendAccountActivationEmail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSignupWithActivation
/**
* Make sure that signup is working if registration with activation is
* requested by administrator.
*/
public function testSignupWithActivation()
{
$model = new SignupForm(['username' => 'some_username', 'email' => 'some_email@example.com', 'password' => 'some_password', 'status' => 1]);
$model->scenario = 'rna';
$user = $model->signup();
$this->assertInstanceOf('common\\models\\User', $user, 'user should be valid');
expect('username should be correct', $user->username)->equals('some_username');
expect('email should be correct', $user->email)->equals('some_email@example.com');
expect('password should be correct', $user->validatePassword('some_password'))->true();
expect('user has valid account activation token', $user->account_activation_token)->notNull();
expect('account activation email should be sent', $model->sendAccountActivationEmail($user))->true();
}