| @@ 61-67 (lines=7) @@ | ||
| 58 | * @test |
|
| 59 | * @covers ::copyIfKeysExist |
|
| 60 | */ |
|
| 61 | public function copyIfKeysExistNumericKeyMap() |
|
| 62 | { |
|
| 63 | $source = ['a' => 'foo', 'b' => 'bar', 'd' => 'baz']; |
|
| 64 | $result = []; |
|
| 65 | A::copyIfKeysExist($source, $result, ['a', 'b', 'c']); |
|
| 66 | $this->assertSame(['a' => 'foo', 'b' => 'bar'], $result); |
|
| 67 | } |
|
| 68 | ||
| 69 | /** |
|
| 70 | * Verify basic behavior of copyIfSet() |
|
| @@ 89-95 (lines=7) @@ | ||
| 86 | * @test |
|
| 87 | * @covers ::copyIfSet |
|
| 88 | */ |
|
| 89 | public function copyIfSetNumericKeyMap() |
|
| 90 | { |
|
| 91 | $source = ['a' => 'foo', 'b' => null, 'd' => 'baz']; |
|
| 92 | $result = []; |
|
| 93 | A::copyIfSet($source, $result, ['a', 'b', 'c', 'd']); |
|
| 94 | $this->assertSame(['a' => 'foo', 'd' => 'baz'], $result); |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * @test |
|