@@ -103,7 +103,7 @@ protected function setUp(): void
103
103
* @param array $expectedFileData
104
104
* @return void
105
105
*
106
- * @dataProvider configDataProvider
106
+ * @dataProvider writeDataProvider
107
107
*/
108
108
public function testWrite (array $ configData , array $ fileData , array $ expectedFileData ): void
109
109
{
@@ -162,7 +162,7 @@ public function testWrite(array $configData, array $fileData, array $expectedFil
162
162
* @param array $configData
163
163
* @return void
164
164
*
165
- * @dataProvider configDataProvider
165
+ * @dataProvider writeErrorFileDataProvider
166
166
*/
167
167
public function testWriteErrorFile (array $ configData ): void
168
168
{
@@ -195,10 +195,75 @@ public function testWriteEmptyReports(): void
195
195
/**
196
196
* @return array
197
197
*/
198
- public function configDataProvider (): array
198
+ public function writeDataProvider (): array
199
+ {
200
+ $ configData = [
201
+ 'providers ' => [
202
+ [
203
+ 'name ' => $ this ->providerName ,
204
+ 'class ' => $ this ->providerClass ,
205
+ 'parameters ' => [
206
+ 'name ' => $ this ->reportName
207
+ ],
208
+ ]
209
+ ]
210
+ ];
211
+ return [
212
+ [
213
+ 'configData ' => $ configData ,
214
+ 'fileData ' => [
215
+ ['number ' => 1 , 'type ' => 'Shoes\"" Usual \\\\" ' ]
216
+ ],
217
+ 'expectedFileData ' => [
218
+ ['number ' => 1 , 'type ' => 'Shoes"" Usual" ' ]
219
+ ]
220
+ ],
221
+ [
222
+ 'configData ' => $ configData ,
223
+ 'fileData ' => [
224
+ ['number ' => 1 , 'type ' => 'hello "World" ' ]
225
+ ],
226
+ 'expectedFileData ' => [
227
+ ['number ' => 1 , 'type ' => 'hello "World" ' ]
228
+ ]
229
+ ],
230
+ [
231
+ 'configData ' => $ configData ,
232
+ 'fileData ' => [
233
+ ['number ' => 1 , 'type ' => 'hello \"World\" ' ]
234
+ ],
235
+ 'expectedFileData ' => [
236
+ ['number ' => 1 , 'type ' => 'hello "World" ' ]
237
+ ]
238
+ ],
239
+ [
240
+ 'configData ' => $ configData ,
241
+ 'fileData ' => [
242
+ ['number ' => 1 , 'type ' => 'hello \\"World \\" ' ]
243
+ ],
244
+ 'expectedFileData ' => [
245
+ ['number ' => 1 , 'type ' => 'hello "World" ' ]
246
+ ]
247
+ ],
248
+ [
249
+ 'configData ' => $ configData ,
250
+ 'fileData ' => [
251
+ ['number ' => 1 , 'type ' => 'hello \\\"World \\\" ' ]
252
+ ],
253
+ 'expectedFileData ' => [
254
+ ['number ' => 1 , 'type ' => 'hello "World" ' ]
255
+ ]
256
+ ],
257
+ ];
258
+ }
259
+
260
+ /**
261
+ * @return array
262
+ */
263
+ public function writeErrorFileDataProvider (): array
199
264
{
200
265
return [
201
- ' reportProvider ' => [
266
+ [
202
267
'configData ' => [
203
268
'providers ' => [
204
269
[
@@ -210,12 +275,6 @@ public function configDataProvider(): array
210
275
]
211
276
]
212
277
],
213
- 'fileData ' => [
214
- ['number ' => 1 , 'type ' => 'Shoes\"" Usual \\\\" ' ]
215
- ],
216
- 'expectedFileData ' => [
217
- ['number ' => 1 , 'type ' => 'Shoes\"\" Usual \\" ' ]
218
- ]
219
278
],
220
279
];
221
280
}
0 commit comments