Skip to content

Commit

Permalink
Merge pull request #2 from mcn-fredw/ChangeTests
Browse files Browse the repository at this point in the history
allow double resolve on objects for partial mocks.
  • Loading branch information
mcn-fredw authored Jan 11, 2019
2 parents 95cc7c3 + 6f895f9 commit e2accf0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MockFromArrayCreatorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ protected function resolveMockBuilderArgument($arg, array &$domain = [])
{
if (! is_array($arg)) {
/* check for domain reference */
if (is_object($arg)) {
/* arg can't be a domain reference */
return $arg;
}
if (2 > strlen($arg)) {
/* arg can't be a domain reference */
return $arg;
Expand Down

0 comments on commit e2accf0

Please sign in to comment.