Skip to content

Commit

Permalink
Always return isBooted false when mocking.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspertey committed Nov 17, 2024
1 parent 57774a4 commit a1d0321
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Support/AutoloadManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,12 @@ protected function resolveAppNamespace()

public static function partialMock()
{
return Mockery::mock(AutoloadManager::class, [null])
$mock = Mockery::mock(AutoloadManager::class, [null])
->makePartial()
->shouldAllowMockingProtectedMethods();

$mock->shouldReceive('isBooted')->andReturn(false);

return $mock;
}
}

0 comments on commit a1d0321

Please sign in to comment.