/** * Ensure everything works as expected. */ public function testApply() { $applyTests = $this->getApplyTests(); foreach ($applyTests as $test) { $source = $test['source']; $apply = $test['apply']; $result = $test['result']; ArrayUtil::apply($source, $apply); foreach ($result as $key => $value) { $this->assertArrayHasKey($key, $source); $this->assertSame($value, $source[$key]); } } }