2 namespace Doctrine\Tests\ORM\Functional;
7 class UUIDGeneratorTest extends \Doctrine\Tests\OrmFunctionalTestCase
9 public function setUp()
13 if ($this->_em->getConnection()->getDatabasePlatform()->getName() != 'mysql') {
14 $this->markTestSkipped('Currently restricted to MySQL platform.');
17 $this->_schemaTool->createSchema(array(
18 $this->_em->getClassMetadata(__NAMESPACE__ . '\\UUIDEntity')
22 public function testGenerateUUID()
24 $entity = new UUIDEntity();
26 $this->_em->persist($entity);
27 $this->assertNotNull($entity->getId());
28 $this->assertTrue(strlen($entity->getId()) > 0);
37 /** @Id @Column(type="string") @GeneratedValue(strategy="UUID") */
44 public function getId()