Definition at line 26 of file MapValuesTest.php.
◆ setUp()
Definition at line 43 of file MapValuesTest.php.
43 : void
44 {
45 $dataFactory = new DataFactory();
46 $language = $this->createMock(
ILIAS\Language\Language::class);
47
48 $this->f = new Refinery($dataFactory, $language);
49 $this->map_values = $this->f->container()->mapValues($this->f->custom()->transformation(fn($v) => $v * 2));
50 }
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
◆ testTransform()
MapValuesTest::testTransform |
( |
| ) |
|
Definition at line 52 of file MapValuesTest.php.
52 : void
53 {
54 $result = $this->map_values->transform($this->test_array);
55 $this->assertEquals($this->result_array, $result);
56 $this->assertEquals(["A", "B", "C"], array_keys($result));
57 }
◆ testTransformFails()
MapValuesTest::testTransformFails |
( |
| ) |
|
Definition at line 59 of file MapValuesTest.php.
59 : void
60 {
61 $this->expectException(InvalidArgumentException::class);
62 $this->map_values->transform(null);
63 }
◆ $f
Refinery MapValuesTest::$f |
|
private |
◆ $map_values
◆ $result_array
array MapValuesTest::$result_array |
|
private |
Initial value:= [
"A" => 520,
"B" => 44,
"C" => 8020
]
Definition at line 35 of file MapValuesTest.php.
◆ $test_array
array MapValuesTest::$test_array |
|
private |
Initial value:= [
"A" => 260,
"B" => 22,
"C" => 4010
]
Definition at line 29 of file MapValuesTest.php.
The documentation for this class was generated from the following file: