Definition at line 10 of file IsNumericConstraintTest.php.
◆ setUp()
IsNumericConstraintTest::setUp |
( |
| ) |
|
Definition at line 12 of file IsNumericConstraintTest.php.
14 $this->df =
new Data\Factory();
15 $this->lng = $this->createMock(\ilLanguage::class);
16 $this->f =
new Factory($this->df, $this->lng);
18 $this->c = $this->f->numeric()->isNumeric();
◆ testAccepts1()
IsNumericConstraintTest::testAccepts1 |
( |
| ) |
|
◆ testAccepts2()
IsNumericConstraintTest::testAccepts2 |
( |
| ) |
|
◆ testAccepts3()
IsNumericConstraintTest::testAccepts3 |
( |
| ) |
|
◆ testAccepts4()
IsNumericConstraintTest::testAccepts4 |
( |
| ) |
|
◆ testAccepts5()
IsNumericConstraintTest::testAccepts5 |
( |
| ) |
|
◆ testAccepts6()
IsNumericConstraintTest::testAccepts6 |
( |
| ) |
|
◆ testAccepts7()
IsNumericConstraintTest::testAccepts7 |
( |
| ) |
|
◆ testAccepts8()
IsNumericConstraintTest::testAccepts8 |
( |
| ) |
|
◆ testCheckFails()
IsNumericConstraintTest::testCheckFails |
( |
| ) |
|
◆ testCheckSucceed()
IsNumericConstraintTest::testCheckSucceed |
( |
| ) |
|
◆ testNoProblemWith()
IsNumericConstraintTest::testNoProblemWith |
( |
| ) |
|
◆ testNotAccepts1()
IsNumericConstraintTest::testNotAccepts1 |
( |
| ) |
|
◆ testNotAccepts2()
IsNumericConstraintTest::testNotAccepts2 |
( |
| ) |
|
◆ testProblemWith()
IsNumericConstraintTest::testProblemWith |
( |
| ) |
|
Definition at line 88 of file IsNumericConstraintTest.php.
91 ->expects($this->once())
96 $this->assertEquals(
"-aa-", $this->c->problemWith(
"aa"));
◆ testRestrictError()
IsNumericConstraintTest::testRestrictError |
( |
| ) |
|
Definition at line 121 of file IsNumericConstraintTest.php.
References $res.
123 $error = $this->df->error(
"error");
125 $res = $this->c->applyTo($error);
126 $this->assertSame($error,
$res);
foreach($_POST as $key=> $value) $res
◆ testRestrictNotOk()
IsNumericConstraintTest::testRestrictNotOk |
( |
| ) |
|
Definition at line 107 of file IsNumericConstraintTest.php.
References $res.
109 $not_ok = $this->df->ok(
"");
112 ->expects($this->once())
114 ->with(
"not_numeric_empty_string")
115 ->willReturn(
"-%s-");
117 $res = $this->c->applyTo($not_ok);
118 $this->assertFalse(
$res->isOk());
foreach($_POST as $key=> $value) $res
◆ testRestrictOk()
IsNumericConstraintTest::testRestrictOk |
( |
| ) |
|
◆ testWithProblemBuilder()
IsNumericConstraintTest::testWithProblemBuilder |
( |
| ) |
|
Definition at line 129 of file IsNumericConstraintTest.php.
131 $new_c = $this->c->withProblemBuilder(
function () {
132 return "This was a fault";
134 $this->assertEquals(
"This was a fault", $new_c->problemWith(
""));
The documentation for this class was generated from the following file: