nextcloud / nextcloud/mail

Improve Provisoning ManagerTest

Open
#12,595 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop technical debt
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

https://github.com/nextcloud/mail/blob/65a26b2441c025d916f91c44d39fe3219c688753/tests/Unit/Service/Provisioning/ManagerTest.php#L262-L263

The phpdoc still annotates $user as IUser|MockObject, but the value is now created via createStub(). This makes the annotation inaccurate/misleading (and can confuse IDEs/static analysis). Either update the annotation to IUser/Stub or switch back to createMock() if you want a MockObject here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open tests/Unit/Service/Provisioning/ManagerTest.php at lines 262-263 and compare the $user phpdoc with the createStub() call. Align the annotation and object creation, then run the relevant ManagerTest test suite to confirm it still passes and static-analysis or IDE warnings are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.