Unexpected mock function call - returning default value.
Function call: foo(NULL, 0, 0)
The mock function has no default action set, and its return type has no default value set.
In general, you should specify the default action: what the mock should do if no expectation matches or if a matched expectation does not specify an action. Google Mock tries to provide a default action where it's safe. In methods that return values, it's returning the default value of the return type. But it's not done for enums, where the default value (0) may not even be among the values specified in the enum.
You don't specify a default action in your program, and the expectation you provide doesn't match, so its action is not used. At this point the framework doesn't know what to return from the mock call, which it considers a fatal error and aborts the program.