◆ setUp()
HasMinLengthConstraintTest::setUp |
( |
| ) |
|
Definition at line 33 of file HasMinLengthConstraintTest.php.
35 $this->df =
new Data\Factory();
36 $this->lng = $this->createMock(\ilLanguage::class);
38 $this->min_length = 10;
◆ testAccepts1()
HasMinLengthConstraintTest::testAccepts1 |
( |
| ) |
|
◆ testAccepts2()
HasMinLengthConstraintTest::testAccepts2 |
( |
| ) |
|
◆ testCheckFails()
HasMinLengthConstraintTest::testCheckFails |
( |
| ) |
|
◆ testCheckSucceed()
HasMinLengthConstraintTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
HasMinLengthConstraintTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts()
HasMinLengthConstraintTest::testNotAccepts |
( |
| ) |
|
◆ testProblemWith()
HasMinLengthConstraintTest::testProblemWith |
( |
| ) |
|
Definition at line 79 of file HasMinLengthConstraintTest.php.
82 ->expects($this->once())
84 ->with(
"not_min_length")
85 ->willReturn(
"-%s-%s-");
87 $this->assertEquals(
"-3-10-", $this->c->problemWith(
"123"));
◆ testRestrictError()
HasMinLengthConstraintTest::testRestrictError |
( |
| ) |
|
Definition at line 106 of file HasMinLengthConstraintTest.php.
References $res.
108 $error = $this->df->error(
"error");
110 $res = $this->c->applyTo($error);
111 $this->assertSame($error,
$res);
foreach($_POST as $key=> $value) $res
◆ testRestrictNotOk()
HasMinLengthConstraintTest::testRestrictNotOk |
( |
| ) |
|
Definition at line 98 of file HasMinLengthConstraintTest.php.
References $res.
100 $not_ok = $this->df->ok(
"1234");
102 $res = $this->c->applyTo($not_ok);
103 $this->assertFalse(
$res->isOk());
foreach($_POST as $key=> $value) $res
◆ testRestrictOk()
HasMinLengthConstraintTest::testRestrictOk |
( |
| ) |
|
◆ testWithProblemBuilder()
HasMinLengthConstraintTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 114 of file HasMinLengthConstraintTest.php.
116 $new_c = $this->c->withProblemBuilder(
function () {
117 return "This was a fault";
119 $this->assertEquals(
"This was a fault", $new_c->problemWith(
""));
◆ $c
HasMinLengthConstraintTest::$c |
|
private |
◆ $df
HasMinLengthConstraintTest::$df |
|
private |
◆ $lng
HasMinLengthConstraintTest::$lng |
|
private |
◆ $min_length
HasMinLengthConstraintTest::$min_length |
|
private |
The documentation for this class was generated from the following file: