Definition at line 24 of file PasswordContraintsTest.php.
◆ constraintsProvider()
PasswordContraintsTest::constraintsProvider |
( |
| ) |
|
Test a set of values.
- Returns
- array[[$constraint,$ok_values,$error_values]]
Definition at line 31 of file PasswordContraintsTest.php.
References $d, $lng, ILIAS\Repository\$refinery, and ILIAS\Data\Factory\password().
33 $lng = $this->createMock(\ilLanguage::class);
34 $d = new \ILIAS\Data\Factory();
41 [
$d->password(
'abc'),
$d->password(
'abcd')],
42 [
$d->password(
'a'),
$d->password(
'ab')]
46 [
$d->password(
'abc'),
$d->password(
'AbC')],
47 [
$d->password(
'AB'),
$d->password(
'21'),
$d->password(
'#*+')]
52 [
$d->password(
'Abc'),
$d->password(
'ABC')],
53 [
$d->password(
'abc'),
$d->password(
'21'),
$d->password(
'#*+')]
57 [
$d->password(
'Ab1'),
$d->password(
'123')],
58 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'#*+')]
62 $v->hasSpecialChars(),
63 [
$d->password(
'Ab+'),
$d->password(
'123#')],
64 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'123')]
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
Refinery Factory $refinery
◆ testAccept()
PasswordContraintsTest::testAccept |
( |
Constraint |
$constraint, |
|
|
array |
$ok_values, |
|
|
array |
$error_values |
|
) |
| |
constraintsProvider
- Parameters
-
Constraint | $constraint | |
| ILIAS | |
Definition at line 75 of file PasswordContraintsTest.php.
References ILIAS\Refinery\Constraint\accepts().
77 foreach ($ok_values as $ok_value) {
78 $this->assertTrue($constraint->
accepts($ok_value));
80 foreach ($error_values as $error_value) {
81 $this->assertFalse($constraint->
accepts($error_value));
accepts($value)
Tells if the provided value complies.
The documentation for this class was generated from the following file: