thd/test/bootstrap/.svn/text-base/functional.php.svn-base
changeset 104 8e4fe6f3337d
parent 103 d2af8a210f5d
child 105 c8f710cd1fb1
equal deleted inserted replaced
103:d2af8a210f5d 104:8e4fe6f3337d
     1 <?php
       
     2 
       
     3 /*
       
     4  * This file is part of the symfony package.
       
     5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
       
     6  *
       
     7  * For the full copyright and license information, please view the LICENSE
       
     8  * file that was distributed with this source code.
       
     9  */
       
    10 
       
    11 // guess current application
       
    12 if (!isset($app))
       
    13 {
       
    14   $traces = debug_backtrace();
       
    15   $caller = $traces[0];
       
    16 
       
    17   $dirPieces = explode(DIRECTORY_SEPARATOR, dirname($caller['file']));
       
    18   $app = array_pop($dirPieces);
       
    19 }
       
    20 
       
    21 require_once dirname(__FILE__).'/../../config/ProjectConfiguration.class.php';
       
    22 $configuration = ProjectConfiguration::getApplicationConfiguration($app, 'test', isset($debug) ? $debug : true);
       
    23 sfContext::createInstance($configuration);
       
    24 
       
    25 // remove all cache
       
    26 sfToolkit::clearDirectory(sfConfig::get('sf_app_cache_dir'));