2010-03-17 01:41:09 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Doctrine\Tests\ORM\Mapping;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping\ClassMetadata,
|
|
|
|
Doctrine\ORM\Mapping\Driver\PhpDriver,
|
|
|
|
Doctrine\ORM\Tools\Export\ClassMetadataExporter;
|
|
|
|
|
|
|
|
require_once __DIR__ . '/../../TestInit.php';
|
|
|
|
|
|
|
|
class PhpMappingDriverTest extends AbstractMappingDriverTest
|
|
|
|
{
|
|
|
|
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
|
|
|
|
// for the same mapping information
|
|
|
|
$cme = new ClassMetadataExporter();
|
2010-03-19 07:19:15 +03:00
|
|
|
$cme->addMappingSource(__DIR__ . DIRECTORY_SEPARATOR . 'yaml');
|
2010-03-17 01:41:09 +03:00
|
|
|
|
|
|
|
$exporter = $cme->getExporter('php', $path);
|
2010-03-19 07:19:15 +03:00
|
|
|
$exporter->setMetadatas($cme->getMetadatas());
|
2010-03-17 01:41:09 +03:00
|
|
|
$exporter->export();
|
|
|
|
*/
|
|
|
|
|
|
|
|
return new PhpDriver($path);
|
|
|
|
}
|
|
|
|
}
|