aboutsummaryrefslogtreecommitdiff
path: root/tests/app/Utils/passwordUtilTest.php
blob: 90c05004fce2418a35cfca8af7b2cf3988820dc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

class FreshRSS_password_UtilTest extends PHPUnit\Framework\TestCase {
	public function testCheck() {
		$password = '1234567';

		$ok = FreshRSS_password_Util::check($password);

		$this->assertTrue($ok);
	}

	public function testCheckReturnsFalseIfEmpty() {
		$password = '';

		$ok = FreshRSS_password_Util::check($password);

		$this->assertFalse($ok);
	}

	public function testCheckReturnsFalseIfLessThan7Characters() {
		$password = '123456';

		$ok = FreshRSS_password_Util::check($password);

		$this->assertFalse($ok);
	}
}