I\'m working on a CodeIgniter project in which I\'m using Doctrine2 and the Symfony2 Validator component.
All my Doctrine2 entities use Doctrine\\ORM\\Mapping
If you are testing and your tests fail because of this. Make sure you have the right autoload configured in your phpunit settings.
For a very specific scenario, my problem was upgrading my symfony version whereas before i had the bootstrap.cache.php file, but on a new version, it is app/autoload. I had to change my phpunit.xml config file and set my bootstrap option to that file bootstrap="autoload.php"