Skip to content

Commit

Permalink
Fix PHPMappingDriver tests
Browse files Browse the repository at this point in the history
  • Loading branch information
velovint committed Nov 28, 2011
1 parent 8408691 commit 9d1402e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
Expand Up @@ -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")));
}
}

Expand Down
17 changes: 7 additions & 10 deletions tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php
Expand Up @@ -14,17 +14,14 @@ protected function _loadDriver()
{
$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);
}
Expand Down

0 comments on commit 9d1402e

Please sign in to comment.