◆ setUp()
GreatherThanConstraintTest::setUp |
( |
| ) |
|
Definition at line 11 of file GreaterThanConstraintTest.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->greater_than = 10;
19 $this->c = $this->f->greaterThan($this->greater_than);
◆ testAccepts()
GreatherThanConstraintTest::testAccepts |
( |
| ) |
|
◆ testCheckFails()
GreatherThanConstraintTest::testCheckFails |
( |
| ) |
|
◆ testCheckSucceed()
GreatherThanConstraintTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
GreatherThanConstraintTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts()
GreatherThanConstraintTest::testNotAccepts |
( |
| ) |
|
◆ testProblemWith()
GreatherThanConstraintTest::testProblemWith |
( |
| ) |
|
Definition at line 49 of file GreaterThanConstraintTest.php.
References Sabre\Event\once().
52 ->expects($this->
once())
54 ->with(
"not_greater_than")
55 ->willReturn(
"-%s-%s-");
57 $this->assertEquals(
"-2-10-", $this->c->problemWith(2));
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.
◆ testRestrictError()
GreatherThanConstraintTest::testRestrictError |
( |
| ) |
|
Definition at line 76 of file GreaterThanConstraintTest.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()
GreatherThanConstraintTest::testRestrictNotOk |
( |
| ) |
|
Definition at line 68 of file GreaterThanConstraintTest.php.
References $res.
70 $not_ok = $this->df->ok(2);
72 $res = $this->c->restrict($not_ok);
73 $this->assertFalse(
$res->isOk());
foreach($_POST as $key=> $value) $res
◆ testRestrictOk()
GreatherThanConstraintTest::testRestrictOk |
( |
| ) |
|
◆ testWithProblemBuilder()
GreatherThanConstraintTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 84 of file GreaterThanConstraintTest.php.
86 $new_c = $this->c->withProblemBuilder(
function () {
87 return "This was a fault";
89 $this->assertEquals(
"This was a fault", $new_c->problemWith(2));
The documentation for this class was generated from the following file: