frontend\tests\unit\models\SignupFormTest::testNotCorrectSignup PHP Méthode

testNotCorrectSignup() public méthode

    public function testNotCorrectSignup()
    {
        $model = new SignupForm(['username' => 'troy.becker', 'email' => '[email protected]', 'password' => 'some_password']);
        expect_not($model->signup());
        expect_that($model->getErrors('username'));
        expect_that($model->getErrors('email'));
        expect($model->getFirstError('username'))->equals('This username has already been taken.');
        expect($model->getFirstError('email'))->equals('This email address has already been taken.');
    }