Completed
Push — add/password-package ( 1b9366...03933e )
by
unknown
54:21 queued 43:23
created

Password_Checker_Test::test_password()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
1
<?php
2
/**
3
 * Tests the Password_Checker package.
4
 *
5
 * @package automattic/jetpack-password-checker
6
 */
7
8
namespace Automattic\Jetpack;
9
10
use WorDBless\BaseTestCase;
11
12
/**
13
 * Test Password_Checker class
14
 */
15
class Password_Checker_Test extends BaseTestCase {
16
17
	/**
18
	 * Test the password checker.
19
	 */
20
	public function test_password() {
21
		$password_checker = new Password_Checker( null );
22
23
		$test_results = $password_checker->test( '123', true );
24
		$this->assertFalse( $test_results['passed'] );
25
26
		$test_results = $password_checker->test( 'password', true );
27
		$this->assertTrue( $test_results['passed'] );
28
	}
29
}
30