当前位置: 首页>>代码示例>>PHP>>正文


PHP OrmFunctionalTestCase::setup方法代码示例

本文整理汇总了PHP中Doctrine\Tests\OrmFunctionalTestCase::setup方法的典型用法代码示例。如果您正苦于以下问题:PHP OrmFunctionalTestCase::setup方法的具体用法?PHP OrmFunctionalTestCase::setup怎么用?PHP OrmFunctionalTestCase::setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Doctrine\Tests\OrmFunctionalTestCase的用法示例。


在下文中一共展示了OrmFunctionalTestCase::setup方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setup

 protected function setup()
 {
     parent::setup();
     try {
         $this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2230User'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2230Address')));
     } catch (ToolsException $e) {
     }
 }
开发者ID:selimcr,项目名称:servigases,代码行数:8,代码来源:DDC2230Test.php

示例2: setup

 /**
  * {@inheritDoc}
  */
 protected function setup()
 {
     parent::setup();
     $platform = $this->_em->getConnection()->getDatabasePlatform();
     if (!$platform->supportsSchemas() && !$platform->canEmulateSchemas()) {
         $this->markTestSkipped("This test is only useful for databases that support schemas or can emulate them.");
     }
 }
开发者ID:selimcr,项目名称:servigases,代码行数:11,代码来源:DDC2825Test.php

示例3: setup

 /**
  * {@inheritDoc}
  */
 protected function setup()
 {
     parent::setup();
     try {
         $this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2692Foo')));
     } catch (\Exception $e) {
         return;
     }
     $this->_em->clear();
 }
开发者ID:selimcr,项目名称:servigases,代码行数:13,代码来源:DDC2692Test.php

示例4: setup

 /**
  * {@inheritDoc}
  */
 protected function setup()
 {
     parent::setup();
     try {
         $this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2660Product'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2660Customer'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2660CustomerOrder')));
     } catch (\Exception $e) {
         return;
     }
     for ($i = 0; $i < 5; $i++) {
         $product = new DDC2660Product();
         $customer = new DDC2660Customer();
         $order = new DDC2660CustomerOrder($product, $customer, 'name' . $i);
         $this->_em->persist($product);
         $this->_em->persist($customer);
         $this->_em->flush();
         $this->_em->persist($order);
         $this->_em->flush();
     }
     $this->_em->clear();
 }
开发者ID:Herriniaina,项目名称:iVarotra,代码行数:23,代码来源:DDC2660Test.php

示例5: setup

 /**
  * {@inheritDoc}
  */
 protected function setup()
 {
     parent::setup();
     try {
         $this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2759Qualification'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2759Category'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2759QualificationMetadata'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2759MetadataCategory')));
     } catch (\Exception $e) {
         return;
     }
     $qualification = new DDC2759Qualification();
     $qualificationMetadata = new DDC2759QualificationMetadata($qualification);
     $category1 = new DDC2759Category();
     $category2 = new DDC2759Category();
     $metadataCategory1 = new DDC2759MetadataCategory($qualificationMetadata, $category1);
     $metadataCategory2 = new DDC2759MetadataCategory($qualificationMetadata, $category2);
     $this->_em->persist($qualification);
     $this->_em->persist($qualificationMetadata);
     $this->_em->persist($category1);
     $this->_em->persist($category2);
     $this->_em->persist($metadataCategory1);
     $this->_em->persist($metadataCategory2);
     $this->_em->flush();
     $this->_em->clear();
 }
开发者ID:Herriniaina,项目名称:iVarotra,代码行数:26,代码来源:DDC2759Test.php

示例6: setup

 /**
  * {@inheritDoc}
  */
 protected function setup()
 {
     parent::setup();
     $this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC3170AbstractEntityJoined'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC3170ProductJoined'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC3170AbstractEntitySingleTable'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC3170ProductSingleTable')));
 }
开发者ID:selimcr,项目名称:servigases,代码行数:8,代码来源:DDC3170Test.php

示例7: setup

 protected function setup()
 {
     parent::setup();
     $this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2256User'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2256Group')));
 }
开发者ID:selimcr,项目名称:servigases,代码行数:5,代码来源:DDC2256Test.php

示例8: setup

 /**
  * {@inheritDoc}
  */
 protected function setup()
 {
     parent::setup();
     $this->_schemaTool->createSchema(array($this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2346Foo'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2346Bar'), $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC2346Baz')));
     $this->logger = new DebugStack();
 }
开发者ID:selimcr,项目名称:servigases,代码行数:9,代码来源:DDC2346Test.php


注:本文中的Doctrine\Tests\OrmFunctionalTestCase::setup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。