Lines Matching refs:this

63         $policy = $this->newPolicy(6, 1, true, true, true, true, 0);
64 …$this->assertTrue($policy->checkPolicy('tested', 'tested'), '1 pool, no user check ' . $policy->er…
65 $this->assertFalse($policy->checkPolicy('test', 'tested'),
67 $this->assertEquals(\helper_plugin_passpolicy::LENGTH_VIOLATION, $policy->error);
68 …$this->assertTrue($policy->checkPolicy('tested99!', 'tested'), '1 pool, no user check ' . $policy-…
70 $policy = $this->newPolicy(6, 3, true, true, true, true, 0);
71 …$this->assertFalse($policy->checkPolicy('tested', 'tested'), '3 pools, no user check ' . $policy->…
72 $this->assertEquals(\helper_plugin_passpolicy::POOL_VIOLATION, $policy->error);
73 …$this->assertTrue($policy->checkPolicy('tested99!', 'tested'), '3 pools, no user check ' . $policy…
75 $policy = $this->newPolicy(6, 1, true, true, true, true, 2);
76 …$this->assertFalse($policy->checkPolicy('tested', 'tested'), '1 pool, user check ' . $policy->erro…
77 $this->assertEquals(\helper_plugin_passpolicy::USERNAME_VIOLATION, $policy->error);
78 …$this->assertFalse($policy->checkPolicy('tested99!', 'tested'), '1 pool, user check ' . $policy->e…
79 $this->assertEquals(\helper_plugin_passpolicy::USERNAME_VIOLATION, $policy->error);
80 …$this->assertFalse($policy->checkPolicy('tested', 'untested'), '1 pool, user check ' . $policy->er…
81 $this->assertEquals(\helper_plugin_passpolicy::USERNAME_VIOLATION, $policy->error);
82 …$this->assertFalse($policy->checkPolicy('tested99!', 'comptessa'), '1 pool1, user check ' . $polic…
83 $this->assertEquals(\helper_plugin_passpolicy::USERNAME_VIOLATION, $policy->error);
88 $policy = $this->newPolicy(6, 1, true, true, true, true, 0, true, true);
89 $this->assertTrue($policy->checkPolicy('bazzel', 'nope'));
90 $this->assertFalse($policy->checkPolicy('eyphed', 'nope'));
91 $this->assertEquals(\helper_plugin_passpolicy::COMMON_VIOLATION, $policy->error);
94 $this->assertTrue($policy->checkPolicy('password', 'nope'));
99 $policy = $this->newPolicy(6, 1, true, true, true, true, 0, false, true, true);
100 $this->assertTrue($policy->checkPolicy('sadf asfd s as asf a afafaa fadfsa fas', 'nope'));
101 $this->assertFalse($policy->checkPolicy('qwertzuiop', 'nope'));
102 $this->assertEquals(\helper_plugin_passpolicy::LEAK_VIOLATION, $policy->error);
105 $this->assertTrue($policy->checkPolicy('qwertzuiop', 'nope'));
110 $policy = $this->newPolicy(3, 0, true, true, true, true, 0);
111 …$this->assertTrue($policy->checkPolicy('lowerUPPER123!"', 'tester'), '0 required, 4 given ' . $pol…
112 …$this->assertTrue($policy->checkPolicy('lowerUPPER123', 'tester'), '0 required, 3 given ' . $polic…
113 …$this->assertTrue($policy->checkPolicy('lowerUPPER', 'tester'), '0 required, 2 given ' . $policy->…
114 …$this->assertTrue($policy->checkPolicy('lower', 'tester'), '0 required, 1 given ' . $policy->error…
116 $policy = $this->newPolicy(3, 1, true, true, true, true, 0);
117 …$this->assertTrue($policy->checkPolicy('lowerUPPER123!"', 'tester'), '1 required, 4 given ' . $pol…
118 …$this->assertTrue($policy->checkPolicy('lowerUPPER123', 'tester'), '1 required, 3 given ' . $polic…
119 …$this->assertTrue($policy->checkPolicy('lowerUPPER', 'tester'), '1 required, 2 given ' . $policy->…
120 …$this->assertTrue($policy->checkPolicy('lower', 'tester'), '1 required, 1 given ' . $policy->error…
122 $policy = $this->newPolicy(3, 2, true, true, true, true, 0);
123 …$this->assertTrue($policy->checkPolicy('lowerUPPER123!"', 'tester'), '2 required, 4 given ' . $pol…
124 …$this->assertTrue($policy->checkPolicy('lowerUPPER123', 'tester'), '2 required, 3 given ' . $polic…
125 …$this->assertTrue($policy->checkPolicy('lowerUPPER', 'tester'), '2 required, 2 given ' . $policy->…
126 …$this->assertFalse($policy->checkPolicy('lower', 'tester'), '2 required, 1 given ' . $policy->erro…
127 $this->assertEquals(\helper_plugin_passpolicy::POOL_VIOLATION, $policy->error);
129 $policy = $this->newPolicy(3, 3, true, true, true, true, 0);
130 …$this->assertTrue($policy->checkPolicy('lowerUPPER123!"', 'tester'), '3 required, 4 given ' . $pol…
131 …$this->assertTrue($policy->checkPolicy('lowerUPPER123', 'tester'), '3 required, 3 given ' . $polic…
132 …$this->assertFalse($policy->checkPolicy('lowerUPPER', 'tester'), '3 required, 2 given ' . $policy-…
133 $this->assertEquals(\helper_plugin_passpolicy::POOL_VIOLATION, $policy->error);
134 …$this->assertFalse($policy->checkPolicy('lower', 'tester'), '3 required, 1 given ' . $policy->erro…
135 $this->assertEquals(\helper_plugin_passpolicy::POOL_VIOLATION, $policy->error);
137 $policy = $this->newPolicy(3, 4, true, true, true, true, 0);
138 …$this->assertTrue($policy->checkPolicy('lowerUPPER123!"', 'tester'), '4 required, 4 given ' . $pol…
139 …$this->assertFalse($policy->checkPolicy('lowerUPPER123', 'tester'), '4 required, 3 given ' . $poli…
140 $this->assertEquals(\helper_plugin_passpolicy::POOL_VIOLATION, $policy->error);
141 …$this->assertFalse($policy->checkPolicy('lowerUPPER', 'tester'), '4 required, 2 given ' . $policy-…
142 $this->assertEquals(\helper_plugin_passpolicy::POOL_VIOLATION, $policy->error);
143 …$this->assertFalse($policy->checkPolicy('lower', 'tester'), '4 required, 1 given ' . $policy->erro…
144 $this->assertEquals(\helper_plugin_passpolicy::POOL_VIOLATION, $policy->error);
149 $policy = $this->newPolicy(6, 4, true, true, true, true, 0, true);
152 $this->assertNotEquals($pw1, $pw2, 'randomness broken');
153 $this->assertTrue(strlen($pw1) >= 6, 'pw too short');
154 $this->assertTrue(strlen($pw2) >= 6, 'pw too short');
155 $this->assertTrue(Clean::isASCII($pw1), 'pw contains non-ASCII, something went wrong');
156 $this->assertTrue(Clean::isASCII($pw2), 'pw contains non-ASCII, something went wrong');
160 $policy = $this->newPolicy(18, 4, true, true, true, true, 0, true);
163 $this->assertNotEquals($pw1, $pw2, 'randomness broken');
164 $this->assertTrue(strlen($pw1) >= 18, 'pw too short');
165 $this->assertTrue(strlen($pw2) >= 18, 'pw too short');
166 $this->assertTrue(Clean::isASCII($pw1), 'pw contains non-ASCII, something went wrong');
167 $this->assertTrue(Clean::isASCII($pw2), 'pw contains non-ASCII, something went wrong');
171 $policy = $this->newPolicy(6, 4, true, true, true, true, 0, false);
174 $this->assertNotEquals($pw1, $pw2, 'randomness broken');
175 $this->assertTrue(strlen($pw1) >= 6, 'pw too short');
176 $this->assertTrue(strlen($pw2) >= 6, 'pw too short');
177 $this->assertTrue(Clean::isASCII($pw1), 'pw contains non-ASCII, something went wrong');
178 $this->assertTrue(Clean::isASCII($pw2), 'pw contains non-ASCII, something went wrong');
182 $policy = $this->newPolicy(18, 4, true, true, true, true, 0, false);
185 $this->assertNotEquals($pw1, $pw2, 'randomness broken');
186 $this->assertTrue(strlen($pw1) >= 18, 'pw too short');
187 $this->assertTrue(strlen($pw2) >= 18, 'pw too short');
188 $this->assertTrue(Clean::isASCII($pw1), 'pw contains non-ASCII, something went wrong');
189 $this->assertTrue(Clean::isASCII($pw2), 'pw contains non-ASCII, something went wrong');
193 $policy = $this->newPolicy(18, 1, false, false, false, true, 0, false);
196 $this->assertNotEquals($pw1, $pw2, 'randomness broken');
197 $this->assertTrue(strlen($pw1) >= 18, 'pw too short');
198 $this->assertTrue(strlen($pw2) >= 18, 'pw too short');
199 $this->assertTrue(Clean::isASCII($pw1), 'pw contains non-ASCII, something went wrong');
200 $this->assertTrue(Clean::isASCII($pw2), 'pw contains non-ASCII, something went wrong');
204 $policy = $this->newPolicy(18, 1, false, false, true, false, 0, false);
207 $this->assertNotEquals($pw1, $pw2, 'randomness broken');
208 $this->assertTrue(strlen($pw1) >= 18, 'pw too short');
209 $this->assertTrue(strlen($pw2) >= 18, 'pw too short');
210 $this->assertTrue(Clean::isASCII($pw1), 'pw contains non-ASCII, something went wrong');
211 $this->assertTrue(Clean::isASCII($pw2), 'pw contains non-ASCII, something went wrong');
215 $policy = $this->newPolicy(18, 1, false, true, false, false, 0, false);
218 $this->assertNotEquals($pw1, $pw2, 'randomness broken');
219 $this->assertTrue(strlen($pw1) >= 18, 'pw too short');
220 $this->assertTrue(strlen($pw2) >= 18, 'pw too short');
221 $this->assertTrue(Clean::isASCII($pw1), 'pw contains non-ASCII, something went wrong');
222 $this->assertTrue(Clean::isASCII($pw2), 'pw contains non-ASCII, something went wrong');
226 $policy = $this->newPolicy(18, 1, true, false, false, false, 0, false);
229 $this->assertNotEquals($pw1, $pw2, 'randomness broken');
230 $this->assertTrue(strlen($pw1) >= 18, 'pw too short');
231 $this->assertTrue(strlen($pw2) >= 18, 'pw too short');
232 $this->assertTrue(Clean::isASCII($pw1), 'pw contains non-ASCII, something went wrong');
233 $this->assertTrue(Clean::isASCII($pw2), 'pw contains non-ASCII, something went wrong');