Tests are now executing correctly.

There xas some errors in the tests:
- Use of Collection#count instead of count($array)
- The Doctrine configuration mock was missing the defaultRepositoryFactory