Code Duplication    Length = 11-12 lines in 3 locations

tests/actions/LoginActionTest.php 2 locations

@@ 38-48 (lines=11) @@
35
        $this->assertEquals('@vendor/yii2mod/yii2-user/views/login', $response['view']);
36
    }
37
38
    public function testLoginSuccess()
39
    {
40
        Yii::$app->request->bodyParams = [
41
            'LoginForm' => [
42
                'email' => '[email protected]',
43
                'password' => 'password',
44
            ],
45
        ];
46
        $this->runAction();
47
        $this->assertFalse(Yii::$app->user->isGuest);
48
    }
49
50
    public function testLoginError()
51
    {
@@ 50-60 (lines=11) @@
47
        $this->assertFalse(Yii::$app->user->isGuest);
48
    }
49
50
    public function testLoginError()
51
    {
52
        Yii::$app->request->bodyParams = [
53
            'LoginForm' => [
54
                'email' => '[email protected]',
55
                'password' => 'failed-password',
56
            ],
57
        ];
58
        $this->runAction();
59
        $this->assertTrue(Yii::$app->user->isGuest);
60
    }
61
}
62

tests/actions/SignupActionTest.php 1 location

@@ 38-49 (lines=12) @@
35
        $this->assertEquals('@vendor/yii2mod/yii2-user/views/signup', $response['view']);
36
    }
37
38
    public function testSignupSuccess()
39
    {
40
        Yii::$app->request->bodyParams = [
41
            'SignupForm' => [
42
                'email' => '[email protected]',
43
                'password' => 'password',
44
                'username' => 'test-user',
45
            ],
46
        ];
47
        $this->runAction();
48
        $this->assertFalse(Yii::$app->user->isGuest);
49
    }
50
51
    public function testSignupError()
52
    {