5 require_once(
"libs/composer/vendor/autoload.php");
25 $lng = $this->createMock(\ilLanguage::class);
26 $d = new \ILIAS\Data\Factory();
27 $validation = new \ILIAS\Validation\Factory(
$d,
$lng);
28 $v = $validation->password();
33 [
$d->password(
'abc'),
$d->password(
'abcd')],
34 [
$d->password(
'a'),
$d->password(
'ab')]
38 [
$d->password(
'abc'),
$d->password(
'AbC')],
39 [
$d->password(
'AB'),
$d->password(
'21'),
$d->password(
'#*+')]
44 [
$d->password(
'Abc'),
$d->password(
'ABC')],
45 [
$d->password(
'abc'),
$d->password(
'21'),
$d->password(
'#*+')]
49 [
$d->password(
'Ab1'),
$d->password(
'123')],
50 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'#*+')]
54 $v->hasSpecialChars(),
55 [
$d->password(
'Ab+'),
$d->password(
'123#')],
56 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'123')]
64 public function testAccept($constraint, $ok_values, $error_values)
66 foreach ($ok_values as $ok_value) {
67 $this->assertTrue($constraint->accepts($ok_value));
69 foreach ($error_values as $error_value) {
70 $this->assertFalse($constraint->accepts($error_value));
testAccept($constraint, $ok_values, $error_values)
constraintsProvider
Test standard-constraints of a password.
constraintsProvider()
Test a set of values.
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d