When you create connections using Doctrine, you gain the ability to easily create and drop the databases related to those connections.
This is as simple as using some functions provided in the Doctrine_Manager or Doctrine_Connection classes.
The following code will iterate over all instantiated connections and call the dropDatabases()/createDatabases() function on each one:
// test.php
// ...
$manager->createDatabases();
$manager->dropDatabases();
Drop/create database for specific connection
You can easily drop or create the database for a specific Doctrine_Connection instance by calling the dropDatabase()/createDatabase() function on the connection instance with the following code:
// test.php
// ...
$conn->createDatabase();
$conn->dropDatabase();