Code Duplication    Length = 8-8 lines in 7 locations

tests/SecurityConfigTest.php 7 locations

@@ 74-81 (lines=8) @@
71
     * @param string $appConfigValue
72
     * @param int $expected
73
     */
74
    public function testGetBruteForceProtectionFailTolerance($appConfigValue, $expected) {
75
        $this->config->expects($this->once())->method('getAppValue')
76
            ->with('security', 'brute_force_protection_fail_tolerance', '3')
77
            ->willReturn($appConfigValue);
78
        $this->assertSame($expected,
79
            $this->securityConfig->getBruteForceProtectionFailTolerance()
80
        );
81
    }
82
    /**
83
     * @dataProvider numericConfTestData
84
     * @param string $appConfigValue
@@ 87-94 (lines=8) @@
84
     * @param string $appConfigValue
85
     * @param int $expected
86
     */
87
    public function testGetBruteForceProtectionTimeThreshold($appConfigValue, $expected) {
88
        $this->config->expects($this->once())->method('getAppValue')
89
            ->with('security', 'brute_force_protection_time_threshold', '600')
90
            ->willReturn($appConfigValue);
91
        $this->assertSame($expected,
92
            $this->securityConfig->getBruteForceProtectionTimeThreshold()
93
        );
94
    }
95
    /**
96
     * @dataProvider numericConfTestData
97
     * @param string $appConfigValue
@@ 100-107 (lines=8) @@
97
     * @param string $appConfigValue
98
     * @param int $expected
99
     */
100
    public function testGetBruteForceProtectionBanPeriod($appConfigValue, $expected) {
101
        $this->config->expects($this->once())->method('getAppValue')
102
            ->with('security', 'brute_force_protection_ban_period', '300')
103
            ->willReturn($appConfigValue);
104
        $this->assertSame($expected,
105
            $this->securityConfig->getBruteForceProtectionBanPeriod()
106
        );
107
    }
108
    /**
109
     * @dataProvider minPassTestData
110
     * @param string $appConfigValue
@@ 113-120 (lines=8) @@
110
     * @param string $appConfigValue
111
     * @param int $expected
112
     */
113
    public function testGetMinPasswordLength($appConfigValue, $expected) {
114
        $this->config->expects($this->once())->method('getAppValue')
115
            ->with('security', 'min_password_length', '8')
116
            ->willReturn($appConfigValue);
117
        $this->assertSame($expected,
118
            $this->securityConfig->getMinPasswordLength()
119
        );
120
    }
121
    /**
122
     * @dataProvider configTestData
123
     * @param string $appConfigValue
@@ 126-133 (lines=8) @@
123
     * @param string $appConfigValue
124
     * @param bool $expected
125
     */
126
    public function testGetIsUpperLowerCaseEnforced($appConfigValue, $expected) {
127
        $this->config->expects($this->once())->method('getAppValue')
128
            ->with('security', 'enforce_upper_lower_case', '0')
129
            ->willReturn($appConfigValue);
130
        $this->assertSame($expected,
131
            $this->securityConfig->getIsUpperLowerCaseEnforced()
132
        );
133
    }
134
    /**
135
     * @dataProvider configTestData
136
     * @param string $appConfigValue
@@ 139-146 (lines=8) @@
136
     * @param string $appConfigValue
137
     * @param bool $expected
138
     */
139
    public function testGetIsNumericCharactersEnforced($appConfigValue, $expected) {
140
        $this->config->expects($this->once())->method('getAppValue')
141
            ->with('security', 'enforce_numeric_characters', '0')
142
            ->willReturn($appConfigValue);
143
        $this->assertSame($expected,
144
            $this->securityConfig->getIsNumericCharactersEnforced()
145
        );
146
    }
147
    /**
148
     * @dataProvider configTestData
149
     * @param string $appConfigValue
@@ 152-159 (lines=8) @@
149
     * @param string $appConfigValue
150
     * @param bool $expected
151
     */
152
    public function testGetIsSpecialCharactersEnforced($appConfigValue, $expected) {
153
        $this->config->expects($this->once())->method('getAppValue')
154
            ->with('security', 'enforce_special_characters', '0')
155
            ->willReturn($appConfigValue);
156
        $this->assertSame($expected,
157
            $this->securityConfig->getIsSpecialCharactersEnforced()
158
        );
159
    }
160
    /**
161
     * @dataProvider numericConfTestData
162
     * @param string $expected