Elektrine lite

← Feed

@gmazzap@phpc.social

Post #486427

2026-03-02 13:05 UTC

@emd@cosocial.ca First, if it's a class *method*, don't use Brain Monkey, but the Mockery directly. Brain Monkey brings Mockery features to *functions*, for object methids you don't need it. Anyway, the mock/stub is reset when you call `Monkey\tearDown()` at the end of every test case (in PHPUnit you do It in test class' `tearDown()`). If in the same test case you need different mock/stub for same function, just do the stub/mock again. The second time it will override what you had before.

Replies (0)

No replies.