I want to create the mongodb schema ensuring indexes using doctrine mongodb odm.
I'm using Symfony 2, Doctrine ODM with mongodb and PHPUnit 4.5.0
One similar question has as suggestions using commands: Symfony2: Creating Schema in PHPUnit only runs one command at a time
But I want to do something more internal like:
PHPUnit code
public function setUp() {
//Get kernel and create mongodb schema with indexes
$kernel->getContainer()->get('doctrine.odm.mongodb.document_manager')-> Generate Schema??
}
public function tearDown() {
//Drop entire schema
}
What are my options?