Skip to content

Instantly share code, notes, and snippets.

@doctrinebot
Created December 13, 2015 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doctrinebot/547fce46a528d6137bc7 to your computer and use it in GitHub Desktop.
Save doctrinebot/547fce46a528d6137bc7 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DDC-214 - https://github.com/doctrine/doctrine2/issues/2828
<?php
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\ORM\Tools;
require_once __DIR__ . '/../../../TestInit.php';
class DDC168Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
protected function setUp() {
$this->useModelSet('cms');
parent::setUp();
}
/**
* @group DDC-168
*/
public function testUpdateSchema()
{
$em = $this->_em;//_getTestEntityManager();
$schemaTool = new Tools\SchemaTool($em);
$classes = array(
$em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsAddress'),
$em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsArticle'),
$em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsComment'),
$em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsEmployee'),
$em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsGroup'),
$em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsPhonenumber'),
$em->getClassMetadata('Doctrine\Tests\Models\CMS\CmsUser'),
);
$schema = $schemaTool->updateSchema($classes);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment