55namespace Php \PieUnitTest \ComposerIntegration ;
66
77use Composer \IO \IOInterface ;
8+ use Php \Pie \ComposerIntegration \MinimalHelperSet ;
89use Php \Pie \ComposerIntegration \QuieterConsoleIO ;
910use PHPUnit \Framework \Attributes \CoversClass ;
1011use PHPUnit \Framework \Attributes \DataProvider ;
1112use PHPUnit \Framework \TestCase ;
12- use Symfony \Component \Console \Helper \HelperSet ;
1313use Symfony \Component \Console \Input \InputInterface ;
1414use Symfony \Component \Console \Output \Output ;
1515use Symfony \Component \Console \Output \OutputInterface ;
@@ -29,7 +29,7 @@ public function testErrorsAreLoggedAndWrittenWhenVerbose(): void
2929 ->method ('write ' )
3030 ->with ('Oh no ' );
3131
32- $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , new HelperSet ([] ));
32+ $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , $ this -> createMock (MinimalHelperSet::class ));
3333 $ io ->writeError ('Oh no ' );
3434
3535 self ::assertSame (['Oh no ' ], $ io ->errors );
@@ -47,7 +47,7 @@ public function testArrayOfErrorsAreLoggedAndWrittenWhenVerbose(): void
4747 ->method ('write ' )
4848 ->with (['Oh no ' , 'Bad things ' ]);
4949
50- $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , new HelperSet ([] ));
50+ $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , $ this -> createMock (MinimalHelperSet::class ));
5151 $ io ->writeError (['Oh no ' , 'Bad things ' ]);
5252
5353 self ::assertSame (['Oh no ' , 'Bad things ' ], $ io ->errors );
@@ -64,7 +64,7 @@ public function testErrorsAreLoggedButNotWritten(): void
6464 ->expects (self ::never ())
6565 ->method ('write ' );
6666
67- $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , new HelperSet ([] ));
67+ $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , $ this -> createMock (MinimalHelperSet::class ));
6868 $ io ->writeError ('Oh no ' );
6969
7070 self ::assertSame (['Oh no ' ], $ io ->errors );
@@ -105,7 +105,7 @@ protected function doWrite(string $message, bool $newline): void
105105 };
106106 $ symfonyOutput ->setVerbosity ($ symfonyVerbosity );
107107
108- $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , new HelperSet ([] ));
108+ $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , $ this -> createMock (MinimalHelperSet::class ));
109109
110110 $ io ->write ('Quiet ' , verbosity: IOInterface::QUIET );
111111 $ io ->write ('Normal ' , verbosity: IOInterface::NORMAL );
0 commit comments