Updated callbacks into test class to fix broken tests on php 5.3.x