@@ -141,6 +141,7 @@ public function testResolveFile()
141
141
$ file = __DIR__ . '/data/reference/base.yaml ' ;
142
142
if (stripos (PHP_OS , 'WIN ' ) === 0 ) {
143
143
$ yaml = str_replace ('##ABSOLUTEPATH## ' , 'file:/// ' . strtr (dirname ($ file ), [' ' => '%20 ' , '\\' => '/ ' ]), file_get_contents ($ file ));
144
+ throw new \Exception ($ yaml );
144
145
} else {
145
146
$ yaml = str_replace ('##ABSOLUTEPATH## ' , 'file:// ' . dirname ($ file ), file_get_contents ($ file ));
146
147
}
@@ -441,6 +442,8 @@ public function testTransitiveReferenceOverTwoFiles()
441
442
description: 'return a cat'
442
443
443
444
YAML ;
445
+ // remove line endings to make string equal on windows
446
+ $ expected = preg_replace ('~\R~ ' , "\n" , $ expected );
444
447
if (PHP_VERSION_ID < 70200 ) {
445
448
// PHP <7.2 returns numeric properties in yaml maps as integer, since 7.2 these are string
446
449
// probably related to https://www.php.net/manual/de/migration72.incompatible.php#migration72.incompatible.object-array-casts
@@ -492,6 +495,8 @@ public function testResolveRelativePathInline()
492
495
description: 'A Cat'
493
496
494
497
YAML ;
498
+ // remove line endings to make string equal on windows
499
+ $ expected = preg_replace ('~\R~ ' , "\n" , $ expected );
495
500
if (PHP_VERSION_ID < 70200 ) {
496
501
// PHP <7.2 returns numeric properties in yaml maps as integer, since 7.2 these are string
497
502
// probably related to https://www.php.net/manual/de/migration72.incompatible.php#migration72.incompatible.object-array-casts
@@ -560,6 +565,8 @@ public function testResolveRelativePathAll()
560
565
description: 'A Cat'
561
566
562
567
YAML ;
568
+ // remove line endings to make string equal on windows
569
+ $ expected = preg_replace ('~\R~ ' , "\n" , $ expected );
563
570
if (PHP_VERSION_ID < 70200 ) {
564
571
// PHP <7.2 returns numeric properties in yaml maps as integer, since 7.2 these are string
565
572
// probably related to https://www.php.net/manual/de/migration72.incompatible.php#migration72.incompatible.object-array-casts
0 commit comments