Fix Testsuite to work with Git
This commit is contained in:
parent
3a8d63608a
commit
324b3ee426
2
tests/.gitignore
vendored
Normal file
2
tests/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
Doctrine/Tests/Proxies/
|
||||
Doctrine/Tests/ORM/Proxy/generated/
|
@ -12,6 +12,10 @@ class YamlMappingDriverTest extends AbstractMappingDriverTest
|
||||
{
|
||||
protected function _loadDriver()
|
||||
{
|
||||
if (!class_exists('Symfony\Components\Yaml\Yaml', true)) {
|
||||
$this->markTestSkipped('Please install Symfony YAML Component into the include path of your PHP installation.');
|
||||
}
|
||||
|
||||
return new YamlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'yaml');
|
||||
}
|
||||
}
|
@ -40,6 +40,10 @@ class ConvertDoctrine1SchemaTest extends \Doctrine\Tests\OrmTestCase
|
||||
{
|
||||
public function testTest()
|
||||
{
|
||||
if (!class_exists('Symfony\Components\Yaml\Yaml', true)) {
|
||||
$this->markTestSkipped('Please install Symfony YAML Component into the include path of your PHP installation.');
|
||||
}
|
||||
|
||||
$cme = new ClassMetadataExporter();
|
||||
$converter = new ConvertDoctrine1Schema(__DIR__ . '/doctrine1schema');
|
||||
|
||||
|
@ -37,6 +37,10 @@ class YamlClassMetadataExporterTest extends AbstractClassMetadataExporterTest
|
||||
{
|
||||
protected function _getType()
|
||||
{
|
||||
if (!class_exists('Symfony\Components\Yaml\Yaml', true)) {
|
||||
$this->markTestSkipped('Please install Symfony YAML Component into the include path of your PHP installation.');
|
||||
}
|
||||
|
||||
return 'yaml';
|
||||
}
|
||||
}
|
@ -13,8 +13,25 @@ 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();
|
||||
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.");
|
||||
}
|
||||
}
|
||||
|
||||
spl_autoload_register(function($class) {
|
||||
if (strpos($class, 'Symfony') === 0) {
|
||||
$file = str_replace("\\", "/", $class);
|
||||
if (@fopen($class, "r")) {
|
||||
require_once ($file);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
set_include_path(
|
||||
__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib'
|
||||
|
Loading…
Reference in New Issue
Block a user