5
5
namespace Php \PieUnitTest \ComposerIntegration ;
6
6
7
7
use Composer \IO \IOInterface ;
8
+ use Php \Pie \ComposerIntegration \MinimalHelperSet ;
8
9
use Php \Pie \ComposerIntegration \QuieterConsoleIO ;
9
10
use PHPUnit \Framework \Attributes \CoversClass ;
10
11
use PHPUnit \Framework \Attributes \DataProvider ;
11
12
use PHPUnit \Framework \TestCase ;
12
- use Symfony \Component \Console \Helper \HelperSet ;
13
13
use Symfony \Component \Console \Input \InputInterface ;
14
14
use Symfony \Component \Console \Output \Output ;
15
15
use Symfony \Component \Console \Output \OutputInterface ;
@@ -29,7 +29,7 @@ public function testErrorsAreLoggedAndWrittenWhenVerbose(): void
29
29
->method ('write ' )
30
30
->with ('Oh no ' );
31
31
32
- $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , new HelperSet ([] ));
32
+ $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , $ this -> createMock (MinimalHelperSet::class ));
33
33
$ io ->writeError ('Oh no ' );
34
34
35
35
self ::assertSame (['Oh no ' ], $ io ->errors );
@@ -47,7 +47,7 @@ public function testArrayOfErrorsAreLoggedAndWrittenWhenVerbose(): void
47
47
->method ('write ' )
48
48
->with (['Oh no ' , 'Bad things ' ]);
49
49
50
- $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , new HelperSet ([] ));
50
+ $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , $ this -> createMock (MinimalHelperSet::class ));
51
51
$ io ->writeError (['Oh no ' , 'Bad things ' ]);
52
52
53
53
self ::assertSame (['Oh no ' , 'Bad things ' ], $ io ->errors );
@@ -64,7 +64,7 @@ public function testErrorsAreLoggedButNotWritten(): void
64
64
->expects (self ::never ())
65
65
->method ('write ' );
66
66
67
- $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , new HelperSet ([] ));
67
+ $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , $ this -> createMock (MinimalHelperSet::class ));
68
68
$ io ->writeError ('Oh no ' );
69
69
70
70
self ::assertSame (['Oh no ' ], $ io ->errors );
@@ -105,7 +105,7 @@ protected function doWrite(string $message, bool $newline): void
105
105
};
106
106
$ symfonyOutput ->setVerbosity ($ symfonyVerbosity );
107
107
108
- $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , new HelperSet ([] ));
108
+ $ io = new QuieterConsoleIO ($ symfonyInput , $ symfonyOutput , $ this -> createMock (MinimalHelperSet::class ));
109
109
110
110
$ io ->write ('Quiet ' , verbosity: IOInterface::QUIET );
111
111
$ io ->write ('Normal ' , verbosity: IOInterface::NORMAL );
0 commit comments