<?php

/*
 * This file is part of the symfony package.
 * (c) Fabien Potencier <*****@*****.**>
 * 
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
$_test_dir = realpath(dirname(__FILE__) . '/..');
// configuration
require_once dirname(__FILE__) . '/../../config/ProjectConfiguration.class.php';
$configuration = ProjectConfiguration::hasActive() ? ProjectConfiguration::getActive() : new ProjectConfiguration(realpath($_test_dir . '/..'));
// autoloader
$autoload = sfSimpleAutoload::getInstance(sfConfig::get('sf_cache_dir') . '/project_autoload.cache');
$autoload->loadConfiguration(sfFinder::type('file')->name('autoload.yml')->in(array(sfConfig::get('sf_symfony_lib_dir') . '/config/config', sfConfig::get('sf_config_dir'))));
$autoload->addDirectory(sfConfig::get('sf_apps_dir'));
$autoload->addDirectory($_test_dir);
$autoload->register();
// lime
include $configuration->getSymfonyLibDir() . '/vendor/lime/lime.php';
// hamcrest
set_include_path(get_include_path() . PATH_SEPARATOR . sfConfig::get("sf_lib_dir") . '/vendor/hamcrest/hamcrest');
require_once 'Hamcrest.php';
Exemple #2
0
<?php

/*
 * This file is part of the symfony package.
 * (c) Fabien Potencier <*****@*****.**>
 * 
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
$_test_dir = realpath(dirname(__FILE__) . '/..');
// configuration
require_once dirname(__FILE__) . '/../../config/ProjectConfiguration.class.php';
$configuration = ProjectConfiguration::hasActive() ? ProjectConfiguration::getActive() : ProjectConfiguration::getApplicationConfiguration('frontend', 'test', true);
// autoloader
$autoload = sfSimpleAutoload::getInstance(sfConfig::get('sf_cache_dir') . '/project_autoload.cache');
$autoload->loadConfiguration(sfFinder::type('file')->name('autoload.yml')->in(array(sfConfig::get('sf_symfony_lib_dir') . '/config/config', sfConfig::get('sf_config_dir'))));
$autoload->register();
// lime
include $configuration->getSymfonyLibDir() . '/vendor/lime/lime.php';
Exemple #3
0
<?php

/*
 * This file is part of the sfPHPUnit2Plugin package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * Idea taken from bootstrap/unit.php of the lime bootstrap file
 */
$_test_dir = realpath(dirname(__FILE__) . '/../..');
$_root_dir = $_test_dir . '/..';
// configuration
require_once $_root_dir . '/config/ProjectConfiguration.class.php';
$configuration = ProjectConfiguration::hasActive() ? ProjectConfiguration::getActive() : new ProjectConfiguration(realpath($_root_dir));
// lime
require_once $configuration->getSymfonyLibDir() . '/vendor/lime/lime.php';
// autoloader
$autoload = sfSimpleAutoload::getInstance(sfConfig::get('sf_cache_dir') . '/project_autoload.cache');
$autoload->loadConfiguration(sfFinder::type('file')->name('autoload.yml')->in(array(sfConfig::get('sf_symfony_lib_dir') . '/config/config', sfConfig::get('sf_config_dir'), $_root_dir . '/plugins/sfPHPUnit2Plugin/lib/config')));
$autoload->register();
Exemple #4
0
<?php

/*
 * This file is part of the symfony package.
 * (c) 2004-2006 Fabien Potencier <*****@*****.**>
 * 
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
$_test_dir = realpath(dirname(__FILE__) . '/..');
require_once dirname(__FILE__) . '/../../config/ProjectConfiguration.class.php';
if (ProjectConfiguration::hasActive()) {
    $configuration = ProjectConfiguration::getActive();
} else {
    $configuration = new ProjectConfiguration(realpath($_test_dir . '/..'));
}
include $configuration->getSymfonyLibDir() . '/vendor/lime/lime.php';