1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/tests/Doctrine/Tests/TestInit.php

34 lines
1.0 KiB
PHP
Raw Normal View History

2008-02-09 02:20:35 +03:00
<?php
2009-01-04 19:15:32 +03:00
/*
* This file bootstraps the test environment.
*/
namespace Doctrine\Tests;
2009-01-04 19:15:32 +03:00
error_reporting(E_ALL | E_STRICT);
2008-02-09 02:20:35 +03:00
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/TextUI/TestRunner.php';
require_once __DIR__ . '/../../../lib/Doctrine/Common/ClassLoader.php';
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine');
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . "/../../../lib/vendor");
$classLoader->register();
2010-04-07 22:35:33 +04:00
if (!file_exists(__DIR__."/Proxies")) {
if (!mkdir(__DIR__."/Proxies")) {
throw new Exception("Could not create " . __DIR__."/Proxies Folder.");
}
}
if (!file_exists(__DIR__."/ORM/Proxy/generated")) {
if (!mkdir(__DIR__."/ORM/Proxy/generated")) {
throw new Exception("Could not create " . __DIR__."/ORM/Proxy/generated Folder.");
}
}
set_include_path(
__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib'
. PATH_SEPARATOR .
get_include_path()
);