You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to mock Zend_Db_Adapter_Abstract, and get an exception thrown "BadMethodCallException: Method :: _ _wakeup() does not exist on this mock object". Looking at the method mock in Container.php, it calls _getInstance which unserializes the mocked object if it has a constructor. This appears to happen before the $quickdefs are applied, so I'm not sure how you can mock an abstract object that has _ _wakeup and __construct defined?
Thanks for the work on this - it's made my testing much easier!
The text was updated successfully, but these errors were encountered:
Patched in master - you can mock classes with a __wakeup (that's not final) though you cannot set expectations of any calls it might make. It's error avoidance - let me know if it works (will be testing more scenarios in time).
I'm trying to mock Zend_Db_Adapter_Abstract, and get an exception thrown "BadMethodCallException: Method :: _ _wakeup() does not exist on this mock object". Looking at the method mock in Container.php, it calls _getInstance which unserializes the mocked object if it has a constructor. This appears to happen before the $quickdefs are applied, so I'm not sure how you can mock an abstract object that has _ _wakeup and __construct defined?
Thanks for the work on this - it's made my testing much easier!
The text was updated successfully, but these errors were encountered: