◆ setUp()
HasMaxLengthConstraintTest::setUp |
( |
| ) |
|
Definition at line 32 of file HasMaxLengthConstraintTest.php.
34 $this->df =
new Data\Factory();
35 $this->lng = $this->createMock(\ilLanguage::class);
37 $this->max_length = 2;
39 $this->c = new \ILIAS\Refinery\String\HasMaxLength(
◆ testAccepts1()
HasMaxLengthConstraintTest::testAccepts1 |
( |
| ) |
|
◆ testAccepts2()
HasMaxLengthConstraintTest::testAccepts2 |
( |
| ) |
|
◆ testCheckFails()
HasMaxLengthConstraintTest::testCheckFails |
( |
| ) |
|
◆ testCheckSucceed()
HasMaxLengthConstraintTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
HasMaxLengthConstraintTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts()
HasMaxLengthConstraintTest::testNotAccepts |
( |
| ) |
|
◆ testProblemWith()
HasMaxLengthConstraintTest::testProblemWith |
( |
| ) |
|
Definition at line 78 of file HasMaxLengthConstraintTest.php.
81 ->expects($this->once())
83 ->with(
"not_max_length")
86 $this->assertEquals(
"-2-", $this->c->problemWith(
"123"));
◆ testRestrictError()
HasMaxLengthConstraintTest::testRestrictError |
( |
| ) |
|
Definition at line 105 of file HasMaxLengthConstraintTest.php.
References $res.
107 $error = $this->df->error(
"error");
109 $res = $this->c->applyTo($error);
110 $this->assertSame($error,
$res);
foreach($_POST as $key=> $value) $res
◆ testRestrictNotOk()
HasMaxLengthConstraintTest::testRestrictNotOk |
( |
| ) |
|
Definition at line 97 of file HasMaxLengthConstraintTest.php.
References $res.
99 $not_ok = $this->df->ok(
"123");
101 $res = $this->c->applyTo($not_ok);
102 $this->assertFalse(
$res->isOk());
foreach($_POST as $key=> $value) $res
◆ testRestrictOk()
HasMaxLengthConstraintTest::testRestrictOk |
( |
| ) |
|
◆ testWithProblemBuilder()
HasMaxLengthConstraintTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 113 of file HasMaxLengthConstraintTest.php.
115 $new_c = $this->c->withProblemBuilder(
function () {
116 return "This was a fault";
118 $this->assertEquals(
"This was a fault", $new_c->problemWith(
"123"));
◆ $c
HasMaxLengthConstraintTest::$c |
|
private |
◆ $df
HasMaxLengthConstraintTest::$df |
|
private |
◆ $lng
HasMaxLengthConstraintTest::$lng |
|
private |
◆ $max_length
HasMaxLengthConstraintTest::$max_length |
|
private |
The documentation for this class was generated from the following file: