Skip to content

Commit

Permalink
Merge pull request #20 from localheinz/fix/output
Browse files Browse the repository at this point in the history
Fix: Use current output rather than NullOutput
  • Loading branch information
localheinz committed Jan 18, 2018
2 parents aea2b72 + d614bd4 commit 0197481
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Command/NormalizeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
return 0;
}

return $this->updateLocker();
return $this->updateLocker($output);
}

private function updateLocker(): int
private function updateLocker(Console\Output\OutputInterface $output): int
{
return $this->getApplication()->run(
new Console\Input\StringInput('update --lock --no-plugins --no-scripts'),
new Console\Output\NullOutput()
$output
);
}
}
2 changes: 1 addition & 1 deletion test/Unit/Command/NormalizeCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ public function testExecuteSucceedsIfLockerIsLockedAndLockerCouldBeUpdatedAfterN
return 'update --lock --no-plugins --no-scripts' === (string) $input;
})
),
Argument::type(Console\Output\NullOutput::class)
Argument::type(Console\Output\OutputInterface::class)
)
->shouldBeCalled()
->willReturn(0);
Expand Down

0 comments on commit 0197481

Please sign in to comment.