Three bugs in test_sync_success_caches_and_returns_models: 1. Mock data lacked taskType=imageInference so normalize_models() filtered everything out → sync() returned false (empty result). 2. wp_remote_retrieve_response_code and wp_remote_retrieve_body not mocked → Brain\Monkey MissingFunctionExpectations. 3. is_wp_error not mocked. 4. get_option/update_option used separate static stores so update_option write was invisible to the subsequent get_option in get_models().
6.1 KiB
6.1 KiB