This error would come from invalid data in ezcobj_state_group_language. real_language_id is set to 0, and this is invalid.
See https://jira.ez.no/browse/EZP-19169. For the default language (ID 2), ezcobj_state_group_language.real_language_id should be set to 2, while language_id will be 3 (always available bit).
I take it that your test database is somehow outdated, at least in regards to this change.