@@ -43,42 +43,4 @@ public function testConvertWithIteratorDoesNotPreserveKeys()
4343 $ this ->assertEquals (['b ' ], $ result );
4444 $ this ->assertNotEquals (['a ' => 'b ' ], $ result );
4545 }
46-
47- /**
48- * @dataProvider fallbackDataProvider
49- */
50- public function testFallback (iterable $ iterator , bool $ preserve_keys , array $ expectedResult )
51- {
52- $ reflectionMethod = new ReflectionMethod (IterableToArray::class, 'fallbackConvert ' );
53- $ reflectionMethod ->setAccessible (true );
54- $ result = $ reflectionMethod ->invoke (null , $ iterator , $ preserve_keys );
55-
56- $ this ->assertEquals ($ expectedResult , $ result );
57- }
58-
59- public function fallbackDataProvider (): array
60- {
61- return [
62- 'Array w/ keys ' => [
63- ['a ' => 'b ' , 'b ' => 'c ' ],
64- true ,
65- ['a ' => 'b ' , 'b ' => 'c ' ],
66- ],
67- 'Array w/out keys ' => [
68- ['a ' => 'b ' , 'b ' => 'c ' ],
69- false ,
70- ['b ' , 'c ' ],
71- ],
72- 'Iterable w/ keys ' => [
73- new ArrayIterator (['a ' => 'b ' , 'b ' => 'c ' ]),
74- true ,
75- ['a ' => 'b ' , 'b ' => 'c ' ],
76- ],
77- 'Iterable w/out keys ' => [
78- new ArrayIterator (['a ' => 'b ' , 'b ' => 'c ' ]),
79- false ,
80- ['b ' , 'c ' ],
81- ],
82- ];
83- }
8446}
0 commit comments