Added test

This commit is contained in:
Zi Xing 2021-09-18 08:26:33 -04:00
parent 16246f3640
commit 6a2c0fb118
1 changed files with 13 additions and 0 deletions

13
tests/test_password.php Normal file
View File

@ -0,0 +1,13 @@
<?php
require('ppm');
import('net.intellivoid.zxcvbn');
if(count($argv) <= 1)
{
print("Pass on the password via a cli argument" . PHP_EOL);
exit();
}
$zxcvbn = new \Zxcvbn\zxcvbn();
print(json_encode($zxcvbn->passwordStrength($argv[1])->toArray(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL);