. */ namespace Doctrine\Tests\ORM\Export; use Doctrine\ORM\Export\ClassExporter; require_once __DIR__ . '/../../TestInit.php'; /** * Test case for testing the ddl class exporter * * @package Doctrine * @subpackage Query * @author Jonathan H. Wage * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link http://www.doctrine-project.org * @since 2.0 * @version $Revision$ */ class ClassExporterTest extends \Doctrine\Tests\OrmTestCase { public function testTest() { // DDL is platform dependant. We can inject the platform to test into the driver mock. $driver = new \Doctrine\Tests\Mocks\DriverMock; $conn = new \Doctrine\Tests\Mocks\ConnectionMock(array(), $driver); //$conn->setDatabasePlatform(new \Doctrine\DBAL\Platforms\SqlitePlatform()); $conn->setDatabasePlatform(new \Doctrine\DBAL\Platforms\MySqlPlatform()); $em = $this->_getTestEntityManager($conn); $classes = array( $em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsUser'), $em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsPhonenumber') ); $exporter = new ClassExporter($em); $sql = $exporter->getExportClassesSql($classes); print_r($sql); } }