Fix #18046: Add test for current ArrayHelper::merge() behavior (#18054)

This commit is contained in:
Alexander Makarov
2020-05-20 18:41:40 +03:00
committed by GitHub
parent eb7b23d117
commit f2d32fab77

View File

@ -493,6 +493,17 @@ class ArrayHelperTest extends TestCase
$this->assertEquals($expected, $result);
}
public function testMergeWithNumericKeys()
{
$a = [10 => [1]];
$b = [10 => [2]];
$result = ArrayHelper::merge($a, $b);
$expected = [10 => [1], 11 => [2]];
$this->assertEquals($expected, $result);
}
public function testMergeWithUnset()
{
$a = [