Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Imap::capability should always return an array#164

Closed
klaussilveira wants to merge 1 commit intozendframework:masterfrom
klaussilveira:patch-1
Closed

Imap::capability should always return an array#164
klaussilveira wants to merge 1 commit intozendframework:masterfrom
klaussilveira:patch-1

Conversation

@klaussilveira
Copy link
Contributor

If there was a communication failure getting the list of capabilities, the return type should be an array, not false.

If there was a communication failure getting the list of capabilities, the return type should be an `array`, not `false`.
@Ocramius
Copy link
Member

Ocramius commented Aug 11, 2017 via email

@klaussilveira
Copy link
Contributor Author

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?

weierophinney added a commit that referenced this pull request Jun 6, 2018
weierophinney added a commit that referenced this pull request Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants