File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1313use Php \Pie \Platform \TargetPhp \PhpBinaryPath ;
1414use Php \Pie \Platform \TargetPlatform ;
1515use PHPUnit \Framework \Attributes \CoversClass ;
16+ use PHPUnit \Framework \Attributes \RequiresOperatingSystemFamily ;
1617use PHPUnit \Framework \MockObject \MockObject ;
1718use PHPUnit \Framework \TestCase ;
1819use Symfony \Component \Console \Output \BufferedOutput ;
2627use function touch ;
2728use function unlink ;
2829
30+ use const PHP_EOL ;
31+
2932#[CoversClass(AddExtensionToTheIniFile::class)]
3033final class AddExtensionToTheIniFileTest extends TestCase
3134{
@@ -82,6 +85,7 @@ public function testReturnsFalseWhenFileIsNotWritable(): void
8285 }
8386 }
8487
88+ #[RequiresOperatingSystemFamily('Linux ' )]
8589 public function testReturnsFalseWhenExistingIniCouldNotBeRead (): void
8690 {
8791 if (TargetPlatform::isRunningAsRoot ()) {
@@ -211,7 +215,10 @@ public function testReturnsTrueWhenExtensionAdded(): void
211215 ));
212216
213217 $ iniContent = file_get_contents ($ iniFile );
214- self ::assertSame ("\n; PIE automatically added this to enable the foo/bar extension \nextension=foobar \n" , $ iniContent );
218+ self ::assertSame (
219+ PHP_EOL . '; PIE automatically added this to enable the foo/bar extension ' . PHP_EOL . 'extension=foobar ' . PHP_EOL ,
220+ $ iniContent ,
221+ );
215222
216223 self ::assertStringContainsString (
217224 sprintf ('Enabled extension foobar in the INI file %s ' , $ iniFile ),
You can’t perform that action at this time.
0 commit comments