當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。