protected function setUp() { if (!class_exists('Symfony\\Component\\Form\\Form')) { $this->markTestSkipped('The "Form" component is not available'); } if (!class_exists('Doctrine\\DBAL\\Platforms\\MySqlPlatform')) { $this->markTestSkipped('Doctrine DBAL is not available.'); } if (!class_exists('Doctrine\\Common\\Version')) { $this->markTestSkipped('Doctrine Common is not available.'); } if (!class_exists('Doctrine\\ORM\\EntityManager')) { $this->markTestSkipped('Doctrine ORM is not available.'); } $this->em = DoctrineOrmTestCase::createTestEntityManager(); parent::setUp(); $schemaTool = new SchemaTool($this->em); $classes = array($this->em->getClassMetadata(self::ENTITY_CLASS)); try { $schemaTool->dropSchema($classes); } catch (\Exception $e) { } try { $schemaTool->createSchema($classes); } catch (\Exception $e) { } $ids = range(1, 300); foreach ($ids as $id) { $name = 65 + chr($id % 57); $this->em->persist(new SingleIdentEntity($id, $name)); } $this->em->flush(); }
protected function setUp() { $this->em = DoctrineTestHelper::createTestEntityManager(); parent::setUp(); $schemaTool = new SchemaTool($this->em); $classes = array($this->em->getClassMetadata(self::ENTITY_CLASS)); try { $schemaTool->dropSchema($classes); } catch (\Exception $e) { } try { $schemaTool->createSchema($classes); } catch (\Exception $e) { } $ids = range(1, 300); foreach ($ids as $id) { $name = 65 + chr($id % 57); $this->em->persist(new SingleIntIdEntity($id, $name)); } $this->em->flush(); }
/** * {@inheritdoc} */ protected function setUp() { @trigger_error('The ' . __CLASS__ . ' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\\Component\\Form\\Test\\FormPerformanceTestCase class instead.', E_USER_DEPRECATED); parent::setUp(); }