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

Feature/issue 391 add should not receive expectation #430

Merged
merged 5 commits into from Feb 18, 2015
Merged

Feature/issue 391 add should not receive expectation #430

merged 5 commits into from Feb 18, 2015

Conversation

robertbasic
Copy link
Collaborator

Took a stab at #391

A convenience method for calling shouldReceive()->never();
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.13%) to 77.26% when pulling c24dc43 on robertbasic:feature/issue-391-add-should-not-receive-expectation into c095665 on padraic:master.

* @param mixed
* @return \Mockery\Expectation
*/
public function shouldNotReceive()
Copy link

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.

@robertbasic
Copy link
Collaborator Author

@aik099 @padraic @davedevelopment PR updated!

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.41%) to 76.99% when pulling bb6a4eb on robertbasic:feature/issue-391-add-should-not-receive-expectation into c095665 on padraic:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.41%) to 76.99% when pulling bb6a4eb on robertbasic:feature/issue-391-add-should-not-receive-expectation into c095665 on padraic:master.

@@ -402,6 +402,31 @@ public function testNeverCalled()
$this->mock->shouldReceive('foo')->never();
}

public function testShouldNotReceive()
{
$this->mock->shouldNotReceive('foo');
Copy link

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?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.41%) to 76.99% when pulling e572f75 on robertbasic:feature/issue-391-add-should-not-receive-expectation into c095665 on padraic:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.62%) to 76.78% when pulling e572f75 on robertbasic:feature/issue-391-add-should-not-receive-expectation into c095665 on padraic:master.

davedevelopment added a commit that referenced this pull request Feb 18, 2015
…-not-receive-expectation

Feature/issue 391 add should not receive expectation
@davedevelopment davedevelopment merged commit a6481d0 into mockery:master Feb 18, 2015
@davedevelopment
Copy link
Collaborator

Good work @robertbasic

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.

None yet

5 participants