Skip to content

Commit

Permalink
Add method without partial mock
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Sep 8, 2024
1 parent 9c950ae commit 26bfbe1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/testing/src/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ protected function mockFilesystem(array $methods = []): Filesystem
});
}

/** @return \Illuminate\Filesystem\Filesystem&\Mockery\MockInterface */
protected function mockFilesystemStrict(array $methods = []): Filesystem
{
return tap(Mockery::mock(Filesystem::class, $methods), function ($filesystem) {
app()->instance(Filesystem::class, $filesystem);
});
}

protected function verifyMockeryExpectations(): void
{
$this->addToAssertionCount(Mockery::getContainer()->mockery_getExpectationCount());
Expand Down

0 comments on commit 26bfbe1

Please sign in to comment.