Definition at line 26 of file MapValuesTest.php.
◆ setUp()
Definition at line 43 of file MapValuesTest.php.
46 $language = $this->createMock(ilLanguage::class);
48 $this->f =
new Refinery($dataFactory, $language);
49 $this->map_values = $this->f->container()->mapValues($this->f->custom()->transformation(fn($v) => $v * 2));
◆ testTransform()
| MapValuesTest::testTransform |
( |
| ) |
|
Definition at line 52 of file MapValuesTest.php.
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));
◆ testTransformFails()
| MapValuesTest::testTransformFails |
( |
| ) |
|
Definition at line 59 of file MapValuesTest.php.
61 $this->expectException(InvalidArgumentException::class);
62 $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: