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

Avoid warnings in PHP 7.2 from count() #718

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

duncan3dc
Copy link
Contributor

PHP 7.2 introduces a warning when you try to count something that isn't countable. Sometimes $this->_expectedArgs is null:

count(): Parameter must be an array or an object that implements Countable

/tmp/vendor/mockery/mockery/library/Mockery/Expectation.php:313
/tmp/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php:173
/tmp/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php:138
/tmp/vendor/mockery/mockery/library/Mockery/ExpectationDirector.php:91
/tmp/test.php:7

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 73.418% when pulling b2f20b3 on duncan3dc:ensure-count-can-count into 6fdb612 on padraic:0.9.

@davedevelopment davedevelopment merged commit 483c43d into mockery:0.9 Apr 7, 2017
@duncan3dc duncan3dc deleted the ensure-count-can-count branch April 7, 2017 09:44
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