Skip to content

Commit

Permalink
Update ChangelogRetrieverTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
eiriksm committed Aug 20, 2022
1 parent c6795c8 commit 32ed333
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Unit/ChangelogRetrieverTest.php
Expand Up @@ -86,7 +86,7 @@ public function testGitSourceSsh()
->willReturn('ababab Change 1');
$mock_process_factory = $this->createMock(ProcessFactoryInterface::class);
$mock_process_factory->method('getProcess')
->with('git -C /tmp/dummy_path log 1.0.0..1.0.1 --oneline')
->with(['git', '-C', '/tmp/dummy_path', 'log', '1.0.0..1.0.1', '--oneline'])
->willReturn($mock_process);
$retriever = new ChangelogRetriever($mock_retriever, $mock_process_factory);
$fake_lock = (object) [
Expand All @@ -113,8 +113,8 @@ public function testRetrieveChangelogAndChangedFiles()
->willReturn("File1\n\nFileOtherFile.php\n\nAnotherFileWeirdExtensionHuh.weird\n");
$mock_process_factory = $this->createMock(ProcessFactoryInterface::class);
$mock_process_factory->method('getProcess')
->willReturnCallback(function ($command) use ($mock_process1, $mock_process2) {
if ($command === 'git -C /tmp/dummy_path log 1.0.0..1.0.1 --oneline') {
->willReturnCallback(function (array $command) use ($mock_process1, $mock_process2) {
if ($command === ['git', '-C', '/tmp/dummy_path', 'log', '1.0.0..1.0.1', '--oneline']) {
return $mock_process1;
}
return $mock_process2;
Expand Down

0 comments on commit 32ed333

Please sign in to comment.