Introducing Hammock, a new open source mocking library for Hacklang. Hammock aims to provide disposable interfaces for mocking and spying public, protected, private, and static methods - as well as global functions - without altering their behavior. Using `fb_intercept` under the hood for mocking and unmocking, it also allows mocking of an individual object without affecting other instances of the same class. Come learn more about Hammock and how you can use this to test your code.


Comments are closed.

I picked up a couple of ideas about hack and hhvm, but I wouldn't use hammock in a project where I need to mock 3 classes in a test for example because I would end up with 3 nested closures.