19declare(strict_types=1);
22use PHPUnit\Framework\TestCase;
23use PHPUnit\Framework\Attributes\DataProvider;
34 $lng =
new class () implements \
ILIAS\Language\Language {
35 public function txt(
string $a_topic,
string $a_default_lang_fallback_mod =
""):
string
39 public function loadLanguageModule(
string $a_module):
void
42 public function getLangKey():
string
46 public function toJS($key):
void
50 $d = new \ILIAS\Data\Factory();
57 [
$d->password(
'abc'),
$d->password(
'abcd')],
58 [
$d->password(
'a'),
$d->password(
'ab')]
62 [
$d->password(
'abc'),
$d->password(
'AbC')],
63 [
$d->password(
'AB'),
$d->password(
'21'),
$d->password(
'#*+')]
68 [
$d->password(
'Abc'),
$d->password(
'ABC')],
69 [
$d->password(
'abc'),
$d->password(
'21'),
$d->password(
'#*+')]
73 [
$d->password(
'Ab1'),
$d->password(
'123')],
74 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'#*+')]
78 $v->hasSpecialChars(),
79 [
$d->password(
'Ab+'),
$d->password(
'123#')],
80 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'123')]
90 #[DataProvider('constraintsProvider')]
93 foreach ($ok_values as $ok_value) {
94 $this->assertTrue($constraint->
accepts($ok_value));
96 foreach ($error_values as $error_value) {
97 $this->assertFalse($constraint->
accepts($error_value));
testAccept(Constraint $constraint, array $ok_values, array $error_values)
static constraintsProvider()
Test a set of values.
A constraint encodes some resrtictions on values.
accepts($value)
Tells if the provided value complies.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.