TestInit.php 1.31 KB
Newer Older
jwage's avatar
jwage committed
1
<?php
romanb's avatar
romanb committed
2 3 4
/*
 * This file bootstraps the test environment.
 */
5
namespace Doctrine\Tests;
romanb's avatar
romanb committed
6

jwage's avatar
jwage committed
7 8
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/TextUI/TestRunner.php';
9
require_once '../lib/Doctrine/Common/ClassLoader.php';
guilhermeblanco's avatar
guilhermeblanco committed
10

11
$classLoader = new \Doctrine\Common\ClassLoader();
12
// checking for existance should not be necessary, remove as soon as possible
13
//$classLoader->setCheckFileExists(true);
14 15
$classLoader->register();

16
$modelDir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'models';
17 18
set_include_path(
    get_include_path()
19
    . PATH_SEPARATOR . __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib'
20 21 22 23 24 25 26
    . PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'cms'
    . PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'company'
    . PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'ecommerce'
    . PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'forum'
);

// Some of these classes depend on Doctrine_* classes
27 28 29 30 31 32 33 34 35
/*require_once 'DoctrineTestCase.php';
require_once 'TestUtil.php';
require_once 'DbalTestCase.php';
require_once 'OrmTestCase.php';
require_once 'OrmFunctionalTestCase.php';
require_once 'DoctrineTestSuite.php';
require_once 'OrmTestSuite.php';
require_once 'OrmFunctionalTestSuite.php';
require_once 'DbalTestSuite.php';*/