Files
FreshRSS/tests/app/Utils/passwordUtilTest.php
Marien Fressinaud 51edbc1578 Improve login and registration pages (#2794)
* Keep the user on login page on failure

* Show an error if username already exists

* Check the password format in the backend

* Return a better message if username is invalid

* Add a title to the login page

* wip: Improve look of login and register pages

* Set a capital M in username help message

On the registration page, username tip started with a minuscule, while
the password tip started with a capital.

* Change message if username is taken
2020-03-08 00:14:29 +01:00

28 lines
538 B
PHP

<?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);
}
}