replacing phpunit's willReturn method