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

Password_Checker_Test   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_password() 0 9 1
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