Definition at line 27 of file MapValuesTest.php.
◆ setUp()
Definition at line 44 of file MapValuesTest.php.
47 $language = $this->createMock(ilLanguage::class);
49 $this->f =
new Refinery($dataFactory, $language);
50 $this->map_values = $this->f->container()->mapValues($this->f->custom()->transformation(fn ($v) => $v * 2));
◆ testTransform()
MapValuesTest::testTransform |
( |
| ) |
|
Definition at line 53 of file MapValuesTest.php.
55 $result = $this->map_values->transform($this->test_array);
56 $this->assertEquals($this->result_array, $result);
57 $this->assertEquals([
"A",
"B",
"C"], array_keys($result));
◆ testTransformFails()
MapValuesTest::testTransformFails |
( |
| ) |
|
Definition at line 60 of file MapValuesTest.php.
62 $this->expectException(InvalidArgumentException::class);
63 $this->map_values->transform(null);
◆ $f
Refinery MapValuesTest::$f |
|
private |
◆ $map_values
◆ $result_array
array MapValuesTest::$result_array |
|
private |
◆ $test_array
array MapValuesTest::$test_array |
|
private |
The documentation for this class was generated from the following file: