19declare(strict_types=1);
24use PHPUnit\Framework\TestCase;
43 protected function setUp(): void
45 $dataFactory =
new DataFactory();
46 $language = $this->createMock(
ILIAS\Language\Language::class);
48 $this->f =
new Refinery($dataFactory, $language);
49 $this->map_values = $this->f->container()->mapValues($this->f->custom()->transformation(fn($v) => $v * 2));
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));
61 $this->expectException(InvalidArgumentException::class);
62 $this->map_values->transform(
null);
Transformation $map_values
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.