Closed ryfighter closed 1 year ago
It seems Mockery reports the error.
ci-phpunit-test does not use Mockery. Remove Mockery or configure it not to report the error.
Mockery is used by all of our hundreds of other tests so that is not an option. We have not had any issues till this patched function. Is it only these replacement functions that have an issue with mockery? Why would a global function not contained within a class even be registered by mockery? You can't mock the global element with mockery.
I don't know what Mockery does. This library does not have Mockery_0::site_url()
.
If you remove Mockery and it would work, probably Mockery does something wrong. Investigate what Mockery does and make it work without the error.
I am having some issues getting the replacement for the helper function redirect() to work correctly.
Example of controller:
Example of Unit Test
When I attempt to run this I am getting an error in the replacement function:
Method Mockery_0::site_url() does not exist on this mock object
This is coming from the first few lines of the file
The thing is, it does look like a replacement function exists for site_url as well but it is not being loaded for some reason. Any ideas on how to mitigate this issue?