source: cpc/trunk/project/test/bootstrap/functional.php @ 2

Last change on this file since 2 was 2, checked in by teymour, 12 years ago

Permier commit

File size: 792 bytes
Line 
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
12if (!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
21require_once dirname(__FILE__).'/../../config/ProjectConfiguration.class.php';
22$configuration = ProjectConfiguration::getApplicationConfiguration($app, 'test', isset($debug) ? $debug : true);
23sfContext::createInstance($configuration);
24
25// remove all cache
26sfToolkit::clearDirectory(sfConfig::get('sf_app_cache_dir'));
Note: See TracBrowser for help on using the repository browser.