1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php

31 lines
895 B
PHP
Raw Normal View History

2010-04-26 16:12:20 +04:00
<?php
namespace Doctrine\Tests\ORM\Mapping;
use Doctrine\ORM\Mapping\ClassMetadata,
2010-04-23 22:37:29 +04:00
Doctrine\ORM\Mapping\Driver\PHPDriver,
2010-04-26 16:12:20 +04:00
Doctrine\ORM\Tools\Export\ClassMetadataExporter;
require_once __DIR__ . '/../../TestInit.php';
2010-04-26 16:25:23 +04:00
class PHPMappingDriverTest extends AbstractMappingDriverTest
2010-04-26 16:12:20 +04:00
{
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();
$cme->addMappingSource(__DIR__ . DIRECTORY_SEPARATOR . 'yaml');
$exporter = $cme->getExporter('php', $path);
$exporter->setMetadatas($cme->getMetadatas());
$exporter->export();
*/
2010-04-23 22:37:29 +04:00
return new PHPDriver($path);
2010-04-26 16:12:20 +04:00
}
}