|
23 | 23 | use Symfony\Component\Console\Style\SymfonyStyle; |
24 | 24 | use FastForward\DevTools\Console\Command\FundingCommand; |
25 | 25 | use FastForward\DevTools\Console\Command\Traits\LogsCommandResults; |
| 26 | +use FastForward\DevTools\Console\Output\GithubActionOutput; |
26 | 27 | use FastForward\DevTools\Filesystem\FilesystemInterface; |
27 | 28 | use FastForward\DevTools\Funding\ComposerFundingCodec; |
28 | 29 | use FastForward\DevTools\Funding\FundingProfile; |
|
61 | 62 | #[UsesClass(DevToolsEnvironment::class)] |
62 | 63 | #[UsesClass(RuntimeEnvironment::class)] |
63 | 64 | #[CoversClass(FundingCommand::class)] |
| 65 | +#[UsesClass(GithubActionOutput::class)] |
64 | 66 | #[UsesClass(FileDiff::class)] |
65 | 67 | #[UsesClass(ComposerFundingCodec::class)] |
66 | 68 | #[UsesClass(FundingProfile::class)] |
@@ -116,9 +118,9 @@ protected function setUp(): void |
116 | 118 | ->willReturn(false); |
117 | 119 | $this->output->writeln(Argument::any()); |
118 | 120 | $this->fileDiffer->formatForConsole(Argument::cetera())->willReturn(null); |
119 | | - $this->logger->info(Argument::cetera())->will(static function (): void {}); |
| 121 | + $this->logger->log('info', Argument::cetera())->will(static function (): void {}); |
120 | 122 | $this->logger->log(Argument::cetera())->will(static function (): void {}); |
121 | | - $this->logger->notice(Argument::cetera())->will(static function (): void {}); |
| 123 | + $this->logger->log('notice', Argument::cetera())->will(static function (): void {}); |
122 | 124 | $this->logger->error(Argument::cetera())->will(static function (): void {}); |
123 | 125 | $this->input->getOption('composer-file') |
124 | 126 | ->willReturn('composer.json'); |
@@ -363,11 +365,12 @@ public function executeWillReturnSuccessWhenComposerFileDoesNotExist(): void |
363 | 365 | { |
364 | 366 | $this->filesystem->exists('composer.json') |
365 | 367 | ->willReturn(false); |
366 | | - $this->logger->info('Synchronizing funding metadata...', [ |
| 368 | + $this->logger->log('info', 'Synchronizing funding metadata...', [ |
367 | 369 | 'input' => $this->input->reveal(), |
368 | 370 | ]) |
369 | 371 | ->shouldBeCalledOnce(); |
370 | | - $this->logger->notice( |
| 372 | + $this->logger->log( |
| 373 | + 'notice', |
371 | 374 | 'Composer file {composer_file} does not exist. Skipping funding synchronization.', |
372 | 375 | [ |
373 | 376 | 'input' => $this->input->reveal(), |
@@ -509,7 +512,7 @@ public function executeWillSkipComposerWriteWhenInteractiveConfirmationIsDecline |
509 | 512 | $fundingYaml, |
510 | 513 | 'Updating managed file .github/FUNDING.yml from generated funding metadata synchronization.', |
511 | 514 | )->willReturn(new FileDiff(FileDiff::STATUS_UNCHANGED, 'Funding unchanged'))->shouldBeCalledOnce(); |
512 | | - $this->logger->notice('Skipped updating {composer_file}.', Argument::type('array')) |
| 515 | + $this->logger->log('notice', 'Skipped updating {composer_file}.', Argument::type('array')) |
513 | 516 | ->shouldBeCalledOnce(); |
514 | 517 | $this->logger->log( |
515 | 518 | 'notice', |
@@ -664,7 +667,8 @@ public function executeWillSkipFundingFileSynchronizationWhenNoSupportedFundingM |
664 | 667 | $composerContents, |
665 | 668 | 'Updating managed file composer.json from generated funding metadata synchronization.', |
666 | 669 | )->willReturn(new FileDiff(FileDiff::STATUS_UNCHANGED, 'Composer unchanged'))->shouldBeCalledOnce(); |
667 | | - $this->logger->notice( |
| 670 | + $this->logger->log( |
| 671 | + 'notice', |
668 | 672 | 'No supported funding metadata found. Skipping .github/FUNDING.yml synchronization.', |
669 | 673 | [ |
670 | 674 | 'input' => $this->input->reveal(), |
|
0 commit comments