I have two different testcases, both puts a mock on a method. Is there a way to clean up mocked objects? Because there are different expectations in the testmethods
May be you need use Mock::close()
:
...
public function tearDown()
{
Mockery::close();
}
...
Create (or recreate) the mock in a test method itself, rather than trying to re-use a pre-generated object (presumably in some kind of setUp function) if it's not suitable for your needs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With