Ticket #3483: sfPropelActAsTaggableBehavior_test-unit.patch
| File sfPropelActAsTaggableBehavior_test-unit.patch, 1.5 kB (added by georgsorst, 2 weeks ago) |
|---|
-
plugins/sfPropelActAsTaggableBehaviorPlugin/test/unit/sfPropelActAsTaggableBehaviorTest.php
old new 4 4 define('TEST_CLASS_2', 'Link'); 5 5 6 6 // initializes testing framework 7 $sf_root_dir = realpath(dirname(__FILE__).'/../../ ../../');7 $sf_root_dir = realpath(dirname(__FILE__).'/../../'); 8 8 $apps_dir = glob($sf_root_dir.'/apps/*', GLOB_ONLYDIR); 9 9 $app = substr($apps_dir[0], 10 10 strrpos($apps_dir[0], DIRECTORY_SEPARATOR) + 1, … … 25 25 } 26 26 27 27 // initialize database manager 28 $databaseManager = new sfDatabaseManager();29 $databaseManager->initialize();30 $con = Propel::getConnection();28 sfContext::getInstance(); 29 Propel::setConfiguration(sfPropelDatabase::getConfiguration()); 30 Propel::initialize(); 31 31 32 32 // clean the database 33 33 TagPeer::doDeleteAll(); … … 401 401 throw new Exception(sprintf('Unknow class "%s"', $classname)); 402 402 } 403 403 404 return new $classname(); 404 $clazz = new $classname(); 405 $clazz->setTitle('test'); 406 return $clazz; 405 407 } 406 408 407 409 // second type of test object creation … … 414 416 throw new Exception(sprintf('Unknow class "%s"', $classname)); 415 417 } 416 418 417 return new $classname(); 419 $clazz = new $classname(); 420 $clazz->setTitle('test'); 421 return $clazz; 418 422 }