fix ContainerBuilder mock generation in tests

By default, PHPUnit mocks all methods of the mocked class. This breaks
when one of the methods has an argument that is type-hinted with a
non-existing class or interface.
Merge pull request #914 from xabbuh/fix-tests

fix ContainerBuilder mock generation in tests