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(); }
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]); }