Skip to content

Commit

Permalink
Merge branch 'patch-8' of https://github.com/hettiger/framework into …
Browse files Browse the repository at this point in the history
…hettiger-patch-8
  • Loading branch information
taylorotwell committed Dec 4, 2019
2 parents 5cbf934 + d69ac3d commit f675d01
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Illuminate/Support/Facades/Facade.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,22 @@ public static function spy()
}
}

/**
* Initiate a partial mock on the facade.
*
* @return \Mockery\MockInterface
*/
public static function partialMock()
{
$name = static::getFacadeAccessor();

$mock = static::isMock()
? static::$resolvedInstance[$name]
: static::createFreshMockInstance();

return $mock->makePartial();
}

/**
* Initiate a mock expectation on the facade.
*
Expand Down

0 comments on commit f675d01

Please sign in to comment.