Definition at line 36 of file FactoryTest.php.
◆ setUp()
ILIAS\Data\Description\FactoryTest::setUp |
( |
| ) |
|
Definition at line 41 of file FactoryTest.php.
43 $this->f =
new Factory();
44 $this->md = $this->createMock(\
ILIAS\
Data\Text\SimpleDocumentMarkdown::class);
Interface Observer Contains several chained tasks and infos about them.
◆ testBool()
ILIAS\Data\Description\FactoryTest::testBool |
( |
| ) |
|
Definition at line 83 of file FactoryTest.php.
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());
◆ testDateTime()
ILIAS\Data\Description\FactoryTest::testDateTime |
( |
| ) |
|
Definition at line 74 of file FactoryTest.php.
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());
◆ testFloat()
ILIAS\Data\Description\FactoryTest::testFloat |
( |
| ) |
|
Definition at line 56 of file FactoryTest.php.
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());
◆ testInt()
ILIAS\Data\Description\FactoryTest::testInt |
( |
| ) |
|
Definition at line 47 of file FactoryTest.php.
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());
◆ testList()
ILIAS\Data\Description\FactoryTest::testList |
( |
| ) |
|
Definition at line 101 of file FactoryTest.php.
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());
◆ testMap()
ILIAS\Data\Description\FactoryTest::testMap |
( |
| ) |
|
Definition at line 111 of file FactoryTest.php.
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());
◆ testNull()
ILIAS\Data\Description\FactoryTest::testNull |
( |
| ) |
|
Definition at line 92 of file FactoryTest.php.
References ILIAS\Data\Description\NULL.
94 $value = $this->f->null($this->md);
96 $this->assertInstanceOf(Description::class, $value);
97 $this->assertInstanceOf(DValue::class, $value);
◆ testObject()
ILIAS\Data\Description\FactoryTest::testObject |
( |
| ) |
|
Definition at line 123 of file FactoryTest.php.
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());
◆ testString()
ILIAS\Data\Description\FactoryTest::testString |
( |
| ) |
|
Definition at line 65 of file FactoryTest.php.
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());
◆ $f
Factory ILIAS\Data\Description\FactoryTest::$f |
|
protected |
◆ $md
The documentation for this class was generated from the following file: