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