# Fake sandbox

Fake sandbox is an approach of creating a Sandbox environment that fakes all of your application external dependencies. The fake external dependencies you create are usually not suitable for production use as they are designed lightweight to be used on a local machine.

This approach comes with the risk of “but it works on my machine” — where the fake external dependency might behave differently when it’s put in production. It’s a good practice to test your application on a production-like environment, therefore if your production is using MySQL for example, you should use MySQL in your sandbox.


# References

Mocks Aren’t Stubs (opens new window)

Fake objects actually have working implementations, but usually take some shortcut which makes them not suitable for production (an in memory database (opens new window) is a good example).