Definition at line 24 of file PasswordContraintsTest.php.
◆ constraintsProvider()
| static PasswordContraintsTest::constraintsProvider |
( |
| ) |
|
|
static |
Test a set of values.
- Returns
- array[[$constraint,$ok_values,$error_values]]
Definition at line 31 of file PasswordContraintsTest.php.
References Vendor\Package\$d, $lng, and ILIAS\UI\examples\Layout\Page\Standard\$refinery.
33 $lng =
new class () implements \
ILIAS\Language\Language {
34 public function txt(
string $a_topic,
string $a_default_lang_fallback_mod =
""): string
38 public function loadLanguageModule(
string $a_module): void
42 $d = new \ILIAS\Data\Factory();
49 [
$d->password(
'abc'),
$d->password(
'abcd')],
50 [
$d->password(
'a'),
$d->password(
'ab')]
54 [
$d->password(
'abc'),
$d->password(
'AbC')],
55 [
$d->password(
'AB'),
$d->password(
'21'),
$d->password(
'#*+')]
60 [
$d->password(
'Abc'),
$d->password(
'ABC')],
61 [
$d->password(
'abc'),
$d->password(
'21'),
$d->password(
'#*+')]
65 [
$d->password(
'Ab1'),
$d->password(
'123')],
66 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'#*+')]
70 $v->hasSpecialChars(),
71 [
$d->password(
'Ab+'),
$d->password(
'123#')],
72 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'123')]
Interface Observer Contains several chained tasks and infos about them.
◆ testAccept()
| PasswordContraintsTest::testAccept |
( |
Constraint |
$constraint, |
|
|
array |
$ok_values, |
|
|
array |
$error_values |
|
) |
| |
constraintsProvider
- Parameters
-
| Constraint | $constraint | |
| ILIAS | |
Definition at line 83 of file PasswordContraintsTest.php.
References ILIAS\Refinery\Constraint\accepts().
85 foreach ($ok_values as $ok_value) {
86 $this->assertTrue($constraint->
accepts($ok_value));
88 foreach ($error_values as $error_value) {
89 $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: