source: pro-violet-viettel/sourcecode/api.violet.vn/www/test/bootstrap/functional.php @ 289

Last change on this file since 289 was 289, checked in by dungnv, 11 years ago
File size: 881 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  $app = array_pop(explode(DIRECTORY_SEPARATOR, dirname($caller['file'])));
17}
18
19// define symfony constant
20define('SF_ROOT_DIR',    realpath(dirname(__FILE__).'/../..'));
21define('SF_APP',         $app);
22define('SF_ENVIRONMENT', 'test');
23define('SF_DEBUG',       true);
24
25// initialize symfony
26require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
27
28// remove all cache
29sfToolkit::clearDirectory(sfConfig::get('sf_cache_dir'));
Note: See TracBrowser for help on using the repository browser.