Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo "Bootstrapping" . PHP_EOL;
- date_default_timezone_set('Europe/Helsinki');
- error_reporting(E_ALL | E_STRICT);
- $testDir = realpath(dirname(__FILE__));
- $extlibs = realpath(dirname(__FILE__).'/../../libs');
- $appDir = realpath($testDir . '/../../app');
- set_include_path(
- realpath($testDir . '/../../libs')
- . PATH_SEPARATOR . realpath($appDir . '/lib/propel')
- . PATH_SEPARATOR . realpath($testDir . '/lib')
- . PATH_SEPARATOR . get_include_path()
- );
- require_once('agavi/agavi.php');
- require_once('agavi/testing/AgaviTesting.class.php');
- AgaviConfig::set('core.testing_dir', realpath(dirname(__FILE__)));
- AgaviConfig::set("tests.dir", $testDir); // where the main tests dir resides
- AgaviConfig::set('core.app_dir', $appDir);
- AgaviConfig::set('ec.components_path', $extlibs . '/eccomponents');
- AgaviConfig::set('core.default_context', 'web');
- echo "Emptying cache ";
- $cacheConfigDir = $appDir . '/cache/config';
- foreach (glob($cacheConfigDir . '/*.php') as $file) {
- unlink($file);
- }
- echo "...done" . PHP_EOL;
- AgaviTesting::bootstrap('testing');
- $_SERVER['REMOTE_ADDR'] = '0.0.0.0';
Add Comment
Please, Sign In to add comment