<?php

/**
 * functional test
 *
 * @package    naji-dev.de
 * @subpackage test
 * @author     Tony Lemke
 * @version    SVN: $Id$
 */
class ndTestFunctionalDoctrine extends sfTestFunctional
{
  public function 
reloadData()
  {
    
// try to drop the database (an exception is thrown,
    // when the database does not exist)
    
try
    {
      
Doctrine::dropDatabases();
    }
    catch (
Exception $e){ }

    
// create databae
    
Doctrine::createDatabases();
    
    
// create tables
    
Doctrine::createTablesFromModels(sfConfig::get('sf_lib_dir').'/model');

    
// load fixtures
    
Doctrine::loadData(sfConfig::get('sf_data_dir').'/fixtures');

    return 
$this;
  }
}