コード例 #1
0
 public function testNotCorrectSignup()
 {
     $model = new UserForm(['username' => 'troy.becker', 'email' => '*****@*****.**', 'password' => 'some_password']);
     expect('username and email are in use, user should not be created', $model->signup())->null();
 }
コード例 #2
0
 function actionUser()
 {
     $model = new UserForm();
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         Yii::$app->session->setFlash('success', "Good you are TRUE");
     }
     return $this->render('userForm', ['model' => $model]);
 }