Definition at line 9 of file LessThanConstraintTest.php.
◆ setUp()
LessThanConstraintTest::setUp |
( |
| ) |
|
Definition at line 11 of file LessThanConstraintTest.php.
13 $this->df =
new Data\Factory();
14 $this->lng = $this->createMock(\ilLanguage::class);
15 $this->f =
new Validation\Factory($this->df, $this->lng);
17 $this->less_than = 10;
19 $this->c = $this->f->lessThan($this->less_than);
◆ testAccepts()
LessThanConstraintTest::testAccepts |
( |
| ) |
|
◆ testCheckFails()
LessThanConstraintTest::testCheckFails |
( |
| ) |
|
◆ testCheckSucceed()
LessThanConstraintTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
LessThanConstraintTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts()
LessThanConstraintTest::testNotAccepts |
( |
| ) |
|
◆ testProblemWith()
LessThanConstraintTest::testProblemWith |
( |
| ) |
|
Definition at line 49 of file LessThanConstraintTest.php.
References Sabre\Event\once().
52 ->expects($this->
once())
54 ->with(
"not_less_than")
55 ->willReturn(
"-%s-%s-");
57 $this->assertEquals(
"-12-{$this->less_than}-", $this->c->problemWith(
"12"));
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
◆ testRestrictError()
LessThanConstraintTest::testRestrictError |
( |
| ) |
|
Definition at line 76 of file LessThanConstraintTest.php.
References $res.
78 $error = $this->df->error(
"error");
80 $res = $this->c->restrict($error);
81 $this->assertSame($error,
$res);
foreach($_POST as $key=> $value) $res
◆ testRestrictNotOk()
LessThanConstraintTest::testRestrictNotOk |
( |
| ) |
|
Definition at line 68 of file LessThanConstraintTest.php.
References $res.
70 $not_ok = $this->df->ok(1234);
72 $res = $this->c->restrict($not_ok);
73 $this->assertFalse(
$res->isOk());
foreach($_POST as $key=> $value) $res
◆ testRestrictOk()
LessThanConstraintTest::testRestrictOk |
( |
| ) |
|
◆ testWithProblemBuilder()
LessThanConstraintTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 84 of file LessThanConstraintTest.php.
86 $new_c = $this->c->withProblemBuilder(
function () {
87 return "This was a fault";
89 $this->assertEquals(
"This was a fault", $new_c->problemWith(13));
The documentation for this class was generated from the following file: