Improved error messages and unit tests in BaseGroupedMapper, fixed CS

Fixed tests for php 5.3
Merge pull request #2411 from pulzarraider/base_group_mapper_impr

Improved error messages and unit tests in BaseGroupedMapper, fixed CS