Redaxscript\Tests\Validator\PasswordTest::testPassword PHP Метод

testPassword() публичный Метод

testPassword
С версии: 2.6.0
public testPassword ( string $password = null, array $hashArray = [], integer $expect = null )
$password string
$hashArray array
$expect integer
    public function testPassword($password = null, $hashArray = [], $expect = null)
    {
        /* setup */
        $validator = new Validator\Password();
        /* actual */
        $actual = $validator->validate($password, function_exists('password_verify') ? $hashArray[0] : $hashArray[1]);
        /* compare */
        $this->assertEquals($expect, $actual);
    }