- Issue created by @gaurav_manerkar
- Status changed to Closed: won't fix
3 months ago 6:51am 14 August 2024 - 🇦🇲Armenia murz Yerevan, Armenia
I checked this and seems it's impossible to implement.
The function
TestHelpers::createClass()
calls the static method::create()
which creates a new instance of the class on its own, and I have no idea how to put there a mock instead of the original class.And the workaround is to use the
TestHelpers::createPartialMockWithConstructor()
instead, and do all the things from the method::create()
manually.So, if you have some ideas about how to implement this - please share and reopen.