@@ -87,9 +87,9 @@ public function setContentsReplacesContentsSetInPreviousCall(): void
8787 }
8888
8989 /**
90- * @return \Generator< array<array<DeclarationBlock> , DeclarationBlock, DeclarationBlock, array<DeclarationBlock>>>
90+ * @return array<string, array<string , DeclarationBlock| array<int, DeclarationBlock>>>
9191 */
92- public static function insertBeforeDataProvider (): \ Generator
92+ public static function insertContentBeforeInsertsContentBeforeSibblingOrAppendsIfSibblingNotFoundDataProvider (): array
9393 {
9494
9595 $ bogusOne = new DeclarationBlock ();
@@ -106,32 +106,28 @@ public static function insertBeforeDataProvider(): \Generator
106106 $ oOrphan = new DeclarationBlock ();
107107 $ oOrphan ->setSelectors ('.forever-alone ' );
108108
109- yield 'insert before ' => [
110- 'initialContent ' => [$ bogusOne , $ oSibling , $ bogusTwo ],
111- 'oItem ' => $ oItem ,
112- 'oSibling ' => $ oSibling ,
113- 'expectedContent ' => [$ bogusOne , $ oItem , $ oSibling , $ bogusTwo ],
114- ];
115- yield 'append if not found ' => [
116- 'initialContent ' => [$ bogusOne , $ oSibling , $ bogusTwo ],
117- 'oItem ' => $ oItem ,
118- 'oSibling ' => $ oOrphan ,
119- 'expectedContent ' => [$ bogusOne , $ oSibling , $ bogusTwo , $ oItem ],
120- ];
109+ return [
110+ 'insert before ' => [
111+ 'initialContent ' => [$ bogusOne , $ oSibling , $ bogusTwo ],
112+ 'oItem ' => $ oItem ,
113+ 'oSibling ' => $ oSibling ,
114+ 'expectedContent ' => [$ bogusOne , $ oItem , $ oSibling , $ bogusTwo ],
115+ ],
116+ 'append if not found ' => [
117+ 'initialContent ' => [$ bogusOne , $ oSibling , $ bogusTwo ],
118+ 'oItem ' => $ oItem ,
119+ 'oSibling ' => $ oOrphan ,
120+ 'expectedContent ' => [$ bogusOne , $ oSibling , $ bogusTwo , $ oItem ],
121+ ]
122+ ];
121123 }
122124
123125 /**
124126 * @test
125127 *
126- * @param $initialContent
127- * @param $oItem
128- * @param $oSibling
129- * @param $sPosition
130- * @param $expectedContent
131- *
132128 * @dataProvider insertBeforeDataProvider
133129 */
134- public function insertContentBefore (
130+ public function insertContentBeforeInsertsContentBeforeSibblingOrAppendsIfSibblingNotFound (
135131 array $ initialContent ,
136132 DeclarationBlock $ oItem ,
137133 DeclarationBlock $ oSibling ,
0 commit comments