From 06998d015fd04f6411a897d43a78a7da4ff432f1 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 24 Mar 2015 00:20:03 +0000 Subject: [PATCH] Skipping DDC-3634 tests when a post-insert generator is unavailable --- .../Doctrine/Tests/ORM/Functional/Ticket/DDC3634Test.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3634Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3634Test.php index 6cbc0158f..9749e31e1 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3634Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3634Test.php @@ -16,9 +16,15 @@ class DDC3634Test extends OrmFunctionalTestCase { protected function setUp() { parent::setUp(); + $metadata = $this->_em->getClassMetadata(DDC3634Entity::CLASSNAME); + + if (! $metadata->idGenerator->isPostInsertGenerator()) { + $this->markTestSkipped('Need a post-insert ID generator in order to make this test work correctly'); + } + try { $this->_schemaTool->createSchema([ - $this->_em->getClassMetadata(DDC3634Entity::CLASSNAME), + $metadata, $this->_em->getClassMetadata(DDC3634JTIBaseEntity::CLASSNAME), $this->_em->getClassMetadata(DDC3634JTIChildEntity::CLASSNAME), ]);