Fix exception "Serialization of 'Closure' is not allowed" when running tests

PHPUnit has an issue serializing closures, and `Doctrine\Instantiator\Instantiator` contains a closure, which is instantiated from the `Symfony\Component\Console\Input\InputInterface` mock