equal
deleted
inserted
replaced
|
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')); |