Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Isolator Laravel Package

icecave/isolator

Icecave Isolator isolates and mocks PHP global state for testing. It provides PHPUnit integration to snapshot and restore global variables, superglobals, constants, and functions, so each test runs in a clean, predictable environment free of hidden state leakage and side effects.

Deep Wiki
Context7

Isolator is a PHP library for isolating static methods and global functions during unit tests, making otherwise untestable code—especially legacy code—fully mockable. It works by loading classes through a custom class loader that rewrites source code at runtime, redirecting calls to functions like time() or rand() toward controllable test doubles.

  • Mock built-in functions such as time(), rand(), and file_get_contents()
  • Isolate static methods without modifying production code
  • Seamless PHPUnit integration via annotations
  • Configurable isolation with a simple, expressive API
  • No PECL extensions or special runtime requirements
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route