1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Fix PHPMappingDriver tests

This commit is contained in:
Vitali Yakavenka 2011-11-28 23:21:46 +03:00
parent 84086915e4
commit 9d1402e4a5
2 changed files with 9 additions and 11 deletions

View File

@ -590,7 +590,8 @@ abstract class Animal
public static function loadMetadata(ClassMetadataInfo $metadata)
{
$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_CUSTOM);
$metadata->setCustomGeneratorDefinition(array("class" => "stdClass", "args" => array("par1", "par2")));
}
}

View File

@ -14,17 +14,14 @@ class PHPMappingDriverTest extends AbstractMappingDriverTest
{
$path = __DIR__ . DIRECTORY_SEPARATOR . 'php';
/*
// Convert YAML mapping information to PHP
// Uncomment this code if the YAML changes and you want to update the PHP code
// Convert Annotation mapping information to PHP
// Uncomment this code if annotations changed and you want to update the PHP code
// for the same mapping information
$cme = new ClassMetadataExporter();
$cme->addMappingSource(__DIR__ . DIRECTORY_SEPARATOR . 'yaml');
$exporter = $cme->getExporter('php', $path);
$exporter->setMetadatas($cme->getMetadatas());
$exporter->export();
*/
// $meta = new \Doctrine\ORM\Mapping\ClassMetadataInfo("Doctrine\Tests\ORM\Mapping\Animal");
// $driver = $this->createAnnotationDriver();
// $driver->loadMetadataForClass("Doctrine\Tests\ORM\Mapping\Animal", $meta);
// $exporter = $cme->getExporter('php', $path);
// echo $exporter->exportClassMetadata($meta);
return new PHPDriver($path);
}