Closed klaussilveira closed 6 years ago
Please do write a test case
On 11 Aug 2017 16:25, "Klaus Silveira" notifications@github.com wrote:
If there was a communication failure getting the list of capabilities, the return type should be an array, not false.
You can view, comment on, or merge this pull request online at:
https://github.com/zendframework/zend-mail/pull/164 Commit Summary
- Imap::capability should always return an array
File Changes
- M src/Protocol/Imap.php https://github.com/zendframework/zend-mail/pull/164/files#diff-0 (2)
Patch Links:
- https://github.com/zendframework/zend-mail/pull/164.patch
- https://github.com/zendframework/zend-mail/pull/164.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zendframework/zend-mail/pull/164, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJakPI-1iKfjcx19lUCudkY0ArxCuMJks5sXGQ1gaJpZM4O0uWW .
I tried. Not really possible without proper mocks and due the way the current suite is setup. It needs a real IMAP server and you can't control it's response from the suite. I only see two possible solutions: abstracting the raw connection logic so read/write methods in this class can be properly tested with mocks OR setting up something like mountebank and mock the socket.
Any suggestions?
If there was a communication failure getting the list of capabilities, the return type should be an
array
, notfalse
.