Ejemplo n.º 1
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.
 */
require_once dirname(__FILE__) . '/../../lib/vendor/lime/lime.php';
$h = new lime_harness(new lime_output_color());
$h->base_dir = realpath(dirname(__FILE__) . '/..');
// cache autoload files
require_once $h->base_dir . '/bootstrap/unit.php';
testAutoloader::initialize(true);
// unit tests
$h->register_glob($h->base_dir . '/unit/*/*Test.php');
// functional tests
$h->register_glob($h->base_dir . '/functional/*Test.php');
$h->register_glob($h->base_dir . '/functional/*/*Test.php');
// other tests
$h->register_glob($h->base_dir . '/other/*Test.php');
$h->run();
testAutoloader::removeCache();
Ejemplo n.º 2
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 $_test_dir . '/../lib/vendor/lime/lime.php';
require_once $_test_dir . '/../lib/config/sfConfig.class.php';
sfConfig::set('sf_symfony_lib_dir', realpath($_test_dir . '/../lib'));
sfConfig::set('sf_symfony_data_dir', realpath($_test_dir . '/../data'));
require_once dirname(__FILE__) . '/testAutoloader.class.php';
testAutoloader::initialize();
function __autoload($class)
{
    return testAutoloader::__autoload($class);
}
class sfException extends Exception
{
    private $name = null;
    protected function setName($name)
    {
        $this->name = $name;
    }
    public function getName()
    {
        return $this->name;
    }