5 require_once(
"libs/composer/vendor/autoload.php");
26 $lng = $this->createMock(\ilLanguage::class);
27 $d = new \ILIAS\Data\Factory();
28 $refinery = new \ILIAS\Refinery\Factory(
$d,
$lng);
29 $v = $refinery->password();
34 [
$d->password(
'abc'),
$d->password(
'abcd')],
35 [
$d->password(
'a'),
$d->password(
'ab')]
39 [
$d->password(
'abc'),
$d->password(
'AbC')],
40 [
$d->password(
'AB'),
$d->password(
'21'),
$d->password(
'#*+')]
45 [
$d->password(
'Abc'),
$d->password(
'ABC')],
46 [
$d->password(
'abc'),
$d->password(
'21'),
$d->password(
'#*+')]
50 [
$d->password(
'Ab1'),
$d->password(
'123')],
51 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'#*+')]
55 $v->hasSpecialChars(),
56 [
$d->password(
'Ab+'),
$d->password(
'123#')],
57 [
$d->password(
'abc'),
$d->password(
'ABC'),
$d->password(
'123')]
65 public function testAccept($constraint, $ok_values, $error_values)
67 foreach ($ok_values as $ok_value) {
68 $this->assertTrue($constraint->accepts($ok_value));
70 foreach ($error_values as $error_value) {
71 $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