Skip to content

Commit

Permalink
[TASK] Use more stubs in the unit tests (#962)
Browse files Browse the repository at this point in the history
This way, the purpose of the stub/mock is more explicit.

Fixes #870
  • Loading branch information
oliverklee authored Nov 1, 2023
1 parent 350fe8a commit 286aa05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/Unit/Controller/TeaControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ protected function setUp(): void
$this->viewMock = $this->createMock(TemplateView::class);
$this->subject->_set('view', $this->viewMock);

$responseMock = $this->createMock(HtmlResponse::class);
$this->subject->method('htmlResponse')->willReturn($responseMock);
$responseStub = $this->createStub(HtmlResponse::class);
$this->subject->method('htmlResponse')->willReturn($responseStub);
}

/**
Expand Down

0 comments on commit 286aa05

Please sign in to comment.