Definition at line 32 of file DListTest.php.
◆ obviousNoMatchProvider()
static ILIAS\Data\Description\DListTest::obviousNoMatchProvider |
( |
| ) |
|
|
static |
Definition at line 59 of file DListTest.php.
References null.
62 [1], [
"1"], [
null], [
true], [new \StdClass()], [new \DateTimeImmutable()]
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ setUp()
ILIAS\Data\Description\DListTest::setUp |
( |
| ) |
|
Definition at line 37 of file DListTest.php.
39 $this->v = $this->createMock(Description::class);
41 $this->createMock(\
ILIAS\
Data\Text\SimpleDocumentMarkdown::class),
Interface Observer Contains several chained tasks and infos about them.
◆ testEmptyMatches()
ILIAS\Data\Description\DListTest::testEmptyMatches |
( |
| ) |
|
Definition at line 66 of file DListTest.php.
References $res.
68 $res = $this->l->getPrimitiveRepresentation([]);
70 $this->assertEquals([],
$res);
◆ testFailsOnValueFailure()
ILIAS\Data\Description\DListTest::testFailsOnValueFailure |
( |
| ) |
|
Definition at line 93 of file DListTest.php.
References $data, and $res.
98 ->method(
"getPrimitiveRepresentation")
99 ->willReturn(fn() => yield
"FAILURE");
101 $res = $this->l->getPrimitiveRepresentation(
$data);
103 $this->assertInstanceOf(\Closure::class,
$res);
104 $errors = iterator_to_array(
$res());
105 $this->assertCount(1, $errors);
106 $this->assertTrue(is_string($errors[0]));
107 $this->assertTrue(str_contains($errors[0],
"FAILURE"));
◆ testForwardsToSubDescription()
ILIAS\Data\Description\DListTest::testForwardsToSubDescription |
( |
| ) |
|
Definition at line 73 of file DListTest.php.
References $data, and $res.
78 $this->v->expects($this->exactly(2))
79 ->method(
"getPrimitiveRepresentation")
80 ->willReturnCallback(
function (
$v) use (&$values) {
81 array_push($values,
$v);
82 return array_shift($values);
85 $expected = [
"c",
"d"];
87 $res = $this->l->getPrimitiveRepresentation(
$data);
89 $this->assertEquals($expected,
$res);
90 $this->assertEquals([
"a",
"b"], $values);
◆ testObviouslyNotMatching()
ILIAS\Data\Description\DListTest::testObviouslyNotMatching |
( |
|
$data | ) |
|
obviousNoMatchProvider
Definition at line 49 of file DListTest.php.
References $data, and $res.
51 $res = $this->l->getPrimitiveRepresentation(
$data);
53 $this->assertInstanceOf(\Closure::class,
$res);
54 $errors = iterator_to_array(
$res());
55 $this->assertCount(1, $errors);
56 $this->assertTrue(is_string($errors[0]));
◆ testRenumbersEntrys()
ILIAS\Data\Description\DListTest::testRenumbersEntrys |
( |
| ) |
|
Definition at line 110 of file DListTest.php.
References $data, and $res.
112 $data = [2 =>
"a", 27 =>
"b"];
115 ->method(
"getPrimitiveRepresentation")
116 ->will($this->returnCallback(fn(
$v) =>
$v));
118 $res = $this->l->getPrimitiveRepresentation(
$data);
120 $expected = [
"a",
"b"];
122 $this->assertEquals($expected,
$res);
◆ $l
DList ILIAS\Data\Description\DListTest::$l |
|
protected |
◆ $v
The documentation for this class was generated from the following file: