Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#823·mockery

Proper support for mocking Final classes

Author: ostroluckyCreated Dec 25, 2017Updated Sep 9, 2025

There is a good post which talks how to do this here https://markbakeruk.net/2017/11/19/extending-final-classes-and-methods-by-manipulating-the-ast/

Might be nice to have it in Mockery and remove current weird proxy workaround

There is also this https://github.com/dg/bypass-finals

Source: mockery/mockery

View original on GitHubView discussion on GitHub