Skip to content

Commit

Permalink
update signature
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Nov 11, 2024
1 parent 1d095bf commit 62924fb
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/unit/SaveBestAnswerToDatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ public function testHandle_WhenKeyIsMissing_ReturnsWithoutAction()

$this->sut = m::mock(SaveBestAnswerToDatabase::class.'[removeBestAnswer,setBestAnswer]', [
m::mock(NotificationSyncer::class),
m::mock(Dispatcher::class),
m::mock(TranslatorInterface::class),
m::mock(BestAnswerRepository::class),
m::mock(SettingsRepositoryInterface::class),
])->shouldAllowMockingProtectedMethods();

$this->sut->shouldNotReceive('removeBestAnswer');
Expand All @@ -70,10 +67,7 @@ public function testHandle_DiscussionDoesNotExistOrMatches_ReturnsWithoutAction(

$this->sut = m::mock(SaveBestAnswerToDatabase::class.'[removeBestAnswer,setBestAnswer]', [
m::mock(NotificationSyncer::class),
m::mock(Dispatcher::class),
m::mock(TranslatorInterface::class),
m::mock(BestAnswerRepository::class),
m::mock(SettingsRepositoryInterface::class),
])->shouldAllowMockingProtectedMethods();

$this->sut->shouldNotReceive('removeBestAnswer');
Expand All @@ -98,9 +92,7 @@ public function testHandle_IdIsZero_CallsRemoveBestAnswer()
$this->sut = m::mock(SaveBestAnswerToDatabase::class.'[removeBestAnswer]', [
$notifications,
m::mock(Dispatcher::class),
m::mock(TranslatorInterface::class),
m::mock(BestAnswerRepository::class),
m::mock(SettingsRepositoryInterface::class),
])->shouldAllowMockingProtectedMethods();

$this->sut->shouldReceive('removeBestAnswer')->once();
Expand All @@ -124,9 +116,7 @@ public function testHandle_IdIsNotZero_CallsSetBestAnswer()
$this->sut = m::mock(SaveBestAnswerToDatabase::class.'[setBestAnswer]', [
$notifications,
m::mock(Dispatcher::class),
m::mock(TranslatorInterface::class),
m::mock(BestAnswerRepository::class),
m::mock(SettingsRepositoryInterface::class),
])->shouldAllowMockingProtectedMethods();

$this->sut->shouldReceive('setBestAnswer')->once();
Expand Down

0 comments on commit 62924fb

Please sign in to comment.