Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Remove unnecessary code #13732

Merged
merged 1 commit into from
May 26, 2016

Conversation

phroggyy
Copy link
Contributor

This just removes some unneeded code from #13724, and fixes an alignment issue in use statements ¯_(ツ)_/¯

@taylorotwell taylorotwell merged commit 73695d9 into laravel:5.2 May 26, 2016
@vlakoff
Copy link
Contributor

vlakoff commented May 26, 2016

Sorry I don't have time to review the code, but how come the shouldReceive were noneffective?

@phroggyy
Copy link
Contributor Author

@vlakoff: they were used while I was working on #13724, but then as one test was removed, I didn't need the mocking any longer, but forgot to get rid of em.

@vlakoff
Copy link
Contributor

vlakoff commented May 26, 2016

Yup, but the shouldReceive mocks weren't called? Weren't they supposed to throw error if not called?

I'm sure you know your code, I'm just surprised that shouldReceive inconsistencies weren't throwing errors. I was trusting them so much.

@phroggyy
Copy link
Contributor Author

They were, but the test was removed (because unit testing the functionality
was stupid), so then they weren't.
On Fri, 27 May 2016 at 00:48, vlakoff notifications@github.com wrote:

Yup, but the shouldReceive mocks weren't called? Weren't they supposed to
throw error if not called?

I'm sure you know your code, I'm just surprised these shouldReceive
inconsistencies weren't throwing errors. I was trusting them so much.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13732 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AG65g2Zt_P0I0gB4atSZ7l_7y_7J9XwCks5qFiNBgaJpZM4In8_f
.

@vlakoff
Copy link
Contributor

vlakoff commented May 26, 2016

Thanks for your prompt replies. And these uncalled shouldReceive didn't throw errors... I should have a look at this, for educational purposes :)

@phroggyy
Copy link
Contributor Author

Ah, that's what you mean. shouldReceive($x) never ensures a call is made.
It just declares if this class receives $x, respond with...
On Fri, 27 May 2016 at 00:58, vlakoff notifications@github.com wrote:

Thanks for your prompt replies. And these uncalled shouldReceive didn't
throw errors... I should have a look at this, for educational purposes :)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13732 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AG65g1aQSMzEtjQkA-NXGkXB2kvFfx4-ks5qFiV7gaJpZM4In8_f
.

@vlakoff
Copy link
Contributor

vlakoff commented May 26, 2016

Mmm, hence the ->never(). That's a bit misleading, isn't it? I'm sure I made this mistake before. Thanks for clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants