19 declare(strict_types=1);
39 protected \ILIAS\Data\Text\SimpleDocumentMarkdown
$md;
44 $this->md = $this->createMock(\
ILIAS\
Data\
Text\SimpleDocumentMarkdown::class);
49 $value = $this->f->int($this->md);
51 $this->assertInstanceOf(Description::class, $value);
52 $this->assertInstanceOf(DValue::class, $value);
53 $this->assertEquals(ValueType::INT, $value->getType());
58 $value = $this->f->float($this->md);
60 $this->assertInstanceOf(Description::class, $value);
61 $this->assertInstanceOf(DValue::class, $value);
62 $this->assertEquals(ValueType::FLOAT, $value->getType());
67 $value = $this->f->string($this->md);
69 $this->assertInstanceOf(Description::class, $value);
70 $this->assertInstanceOf(DValue::class, $value);
71 $this->assertEquals(ValueType::STRING, $value->getType());
76 $value = $this->f->datetime($this->md);
78 $this->assertInstanceOf(Description::class, $value);
79 $this->assertInstanceOf(DValue::class, $value);
80 $this->assertEquals(ValueType::DATETIME, $value->getType());
85 $value = $this->f->bool($this->md);
87 $this->assertInstanceOf(Description::class, $value);
88 $this->assertInstanceOf(DValue::class, $value);
89 $this->assertEquals(ValueType::BOOL, $value->getType());
94 $value = $this->f->null($this->md);
96 $this->assertInstanceOf(Description::class, $value);
97 $this->assertInstanceOf(DValue::class, $value);
103 $value = $this->f->string($this->md);
104 $list = $this->f->list($this->md, $value);
106 $this->assertInstanceOf(Description::class, $list);
107 $this->assertInstanceOf(DList::class, $list);
108 $this->assertEquals($value, $list->getValueType());
113 $key = $this->f->string($this->md);
114 $value = $this->f->string($this->md);
115 $map = $this->f->map($this->md, $key, $value);
117 $this->assertInstanceOf(Description::class, $map);
118 $this->assertInstanceOf(DMap::class, $map);
119 $this->assertEquals($key, $map->getKeyType());
120 $this->assertEquals($value, $map->getValueType());
125 $f1_type = $this->f->int($this->md);
127 $f2_type = $this->f->float($this->md);
129 $object = $this->f->object($this->md, [$f1_name => $f1_type, $f2_name => $f2_type]);
131 $this->assertInstanceOf(Description::class, $object);
132 $this->assertInstanceOf(DObject::class, $object);
133 [$f1, $f2] = iterator_to_array($object->getFields());
134 $this->assertEquals($f1_name, $f1->getName());
135 $this->assertEquals($f1_type, $f1->getType());
136 $this->assertEquals($f2_name, $f2->getName());
137 $this->assertEquals($f2_type, $f2->getType());
Interface Observer Contains several chained tasks and infos about them.
ILIAS Data Text SimpleDocumentMarkdown $md