In the Zombie driver you've performed additional check for `function` before doing this replacement (see https://github.com/Behat/MinkZombieDriver/pull/61/files). Are you sure that it's not needed here as well?