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

Comments are closed.

Florin at 14:36 on 21 Feb 2020

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.