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
Feature/issue 391 add should not receive expectation #430
Feature/issue 391 add should not receive expectation #430
Conversation
A convenience method for calling shouldReceive()->never();
* @param mixed | ||
* @return \Mockery\Expectation | ||
*/ | ||
public function shouldNotReceive() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this needs to be added to MockInterface
as well.
@aik099 @padraic @davedevelopment PR updated! |
1 similar comment
@@ -402,6 +402,31 @@ public function testNeverCalled() | |||
$this->mock->shouldReceive('foo')->never(); | |||
} | |||
|
|||
public function testShouldNotReceive() | |||
{ | |||
$this->mock->shouldNotReceive('foo'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you be calling $this->container->mockery_verify();
here as well and verify, that if more than 0 calls are made we're getting an exception?
…-not-receive-expectation Feature/issue 391 add should not receive expectation
Good work @robertbasic |
Took a stab at #391