@@ -225,25 +225,28 @@ public function testPathParametersAreArrays()
225
225
$ output = dirname (__DIR__ ) . $ dirSep . 'compiled.yml ' ;
226
226
shell_exec ('php ' . dirname (__DIR__ , 2 ) . "{$ dirSep }bin {$ dirSep }php-openapi inline " . $ file . ' ' . $ output );
227
227
228
- $ expected = "{$ dirSep }data {$ dirSep }issue {$ dirSep }155 {$ dirSep }compiled-symfony-7.yml " ;
228
+ $ baseExpected = dirname (__DIR__ )."{$ dirSep }data {$ dirSep }issue {$ dirSep }155 {$ dirSep }" ;
229
+ $ expected = $ baseExpected .'compiled-symfony-7.yml ' ;
229
230
$ version = static ::symfonyYamlVersion ();
230
231
$ majorVersion = explode ('. ' , $ version )[0 ];
231
232
232
233
if ($ majorVersion == 6 ) {
233
- $ expected = "{ $ dirSep } data { $ dirSep } issue { $ dirSep } 155 { $ dirSep } compiled-symfony-6.yml " ;
234
+ $ expected = $ baseExpected . " compiled-symfony-6.yml " ;
234
235
if (version_compare (PHP_VERSION , '8.1 ' , '>= ' ) && version_compare ($ version , '6.0.0 ' , '!= ' )) {
235
- $ expected = "{ $ dirSep } data { $ dirSep } issue { $ dirSep } 155 { $ dirSep } compiled-symfony-7.yml " ;
236
+ $ expected = $ baseExpected . " compiled-symfony-7.yml " ;
236
237
}
237
238
} elseif ($ majorVersion == 5 ) {
238
- $ expected = "{ $ dirSep } data { $ dirSep } issue { $ dirSep } 155 { $ dirSep } compiled-symfony-6.yml " ;
239
+ $ expected = $ baseExpected . " compiled-symfony-6.yml " ;
239
240
}
240
241
if (stripos (PHP_OS , 'WIN ' ) === 0 ) {
242
+
241
243
// $expected = "{$dirSep}data{$dirSep}issue{$dirSep}155{$dirSep}compiled-symfony-6-windows-lf.yml";
242
244
;
243
245
file_put_contents ($ output , preg_replace ('~\R~ ' , "\n" , file_get_contents ($ output )));
246
+ file_put_contents ($ expected , preg_replace ('~\R~ ' , "\n" , file_get_contents ($ expected )));
244
247
}
245
248
246
- $ this ->assertFileEquals ($ output , dirname ( __DIR__ ) . $ expected );
249
+ $ this ->assertFileEquals ($ output , $ expected );
247
250
unlink ($ output );
248
251
}
249
252
0 commit comments