mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-22 13:16:19 +01:00
[CLEANUP] Use more stubs instead of mocks (#995)
This makes the purpose of the test doubles more clear to the reader. Fixes #986
This commit is contained in:
parent
3cdf8df7a0
commit
450905287c
2 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ final class FrontEndEditorControllerTest extends UnitTestCase
|
|||
$userUid = 5;
|
||||
$this->setUidOfLoggedInUser($userUid);
|
||||
|
||||
$teas = $this->createMock(QueryResultInterface::class);
|
||||
$teas = $this->createStub(QueryResultInterface::class);
|
||||
$this->teaRepositoryMock->method('findByOwnerUid')->with($userUid)->willReturn($teas);
|
||||
$this->viewMock->expects(self::once())->method('assign')->with('teas', $teas);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ final class TeaControllerTest extends UnitTestCase
|
|||
*/
|
||||
public function indexActionAssignsAllTeaAsTeasToView(): void
|
||||
{
|
||||
$teas = $this->createMock(QueryResultInterface::class);
|
||||
$teas = $this->createStub(QueryResultInterface::class);
|
||||
$this->teaRepositoryMock->method('findAll')->willReturn($teas);
|
||||
$this->viewMock->expects(self::once())->method('assign')->with('teas', $teas);
|
||||
|
||||
|
|
Loading…
Reference in a new issue