19 declare(strict_types=1);
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 41 public function getLangKey():
string 45 public function toJS($key):
void 49 $d = new \ILIAS\Data\Factory();
56 [
$d->password(
'abc'),
$d->password(
'abcd')],
57 [
$d->password(
'a'),
$d->password(
'ab')]
61 [
$d->password(
'abc'),
$d->password(
'AbC')],
62 [
$d->password(
'AB'),
$d->password(
'21'),
$d->password(
'#*+')]
67 [
$d->password(
'Abc'),
$d->password(
'ABC')],
68 [
$d->password(
'abc'),
$d->password(
'21'),
$d->password(
'#*+')]
72 [
$d->password(
'Ab1'),
$d->password(
'123')],
73 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'#*+')]
77 $v->hasSpecialChars(),
78 [
$d->password(
'Ab+'),
$d->password(
'123#')],
79 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'123')]
92 foreach ($ok_values as $ok_value) {
93 $this->assertTrue($constraint->
accepts($ok_value));
95 foreach ($error_values as $error_value) {
96 $this->assertFalse($constraint->
accepts($error_value));
static constraintsProvider()
Test a set of values.
Interface Observer Contains several chained tasks and infos about them.
A constraint encodes some resrtictions on values.
testAccept(Constraint $constraint, array $ok_values, array $error_values)
constraintsProvider
accepts($value)
Tells if the provided value complies.