@@ 294-306 (lines=13) @@ | ||
291 | * @param array $test_data the current test data. |
|
292 | * @return Boolean does the test pass? |
|
293 | */ |
|
294 | protected function test_preg_match( $test_data ) { |
|
295 | $password = stripslashes( $this->password ); |
|
296 | ||
297 | if ( isset( $test_data['trim'] ) ) { |
|
298 | $password = substr( $password, 1, -1 ); |
|
299 | } |
|
300 | ||
301 | if ( ! preg_match( '/' . $test_data['pattern'] . '/u', $password ) ) { |
|
302 | return false; |
|
303 | } |
|
304 | ||
305 | return true; |
|
306 | } |
|
307 | ||
308 | /** |
|
309 | * Provides the comparison tester functionality. |
@@ 302-314 (lines=13) @@ | ||
299 | * @param array $test_data the current test data. |
|
300 | * @return Boolean does the test pass? |
|
301 | */ |
|
302 | protected function test_preg_match( $test_data ) { |
|
303 | $password = stripslashes( $this->password ); |
|
304 | ||
305 | if ( isset( $test_data['trim'] ) ) { |
|
306 | $password = substr( $password, 1, -1 ); |
|
307 | } |
|
308 | ||
309 | if ( ! preg_match( '/' . $test_data['pattern'] . '/u', $password ) ) { |
|
310 | return false; |
|
311 | } |
|
312 | ||
313 | return true; |
|
314 | } |
|
315 | ||
316 | /** |
|
317 | * Provides the comparison tester functionality. |