當前位置: 首頁>>代碼示例>>PHP>>正文


PHP d7\MigrateDrupal7TestBase類代碼示例

本文整理匯總了PHP中Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase的典型用法代碼示例。如果您正苦於以下問題:PHP MigrateDrupal7TestBase類的具體用法?PHP MigrateDrupal7TestBase怎麽用?PHP MigrateDrupal7TestBase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了MigrateDrupal7TestBase類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(static::$modules);
     $this->installEntitySchema('block_content');
     $this->executeMigrations(['d7_filter_format', 'block_content_type', 'block_content_body_field', 'd7_custom_block']);
 }
開發者ID:aWEBoLabs,項目名稱:taxi,代碼行數:10,代碼來源:MigrateCustomBlockTest.php

示例2: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(static::$modules);
     $this->installEntitySchema('node');
     $this->executeMigrations(['d7_node_type', 'd7_node_title_label']);
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:10,代碼來源:MigrateNodeTitleLabelTest.php

示例3: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     // Prepare to migrate user pictures as well.
     $this->installEntitySchema('file');
     $this->executeMigrations(['user_picture_field', 'user_picture_field_instance', 'd7_user_role', 'd7_user']);
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:10,代碼來源:MigrateUserTest.php

示例4: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(['block_content']);
     $this->installEntitySchema('block_content');
     $this->executeMigration('block_content_type');
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:10,代碼來源:MigrateBlockContentTypeTest.php

示例5: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('menu_link_content');
     $this->executeMigration('menu');
     \Drupal::service('router.builder')->rebuild();
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:10,代碼來源:MigrateMenuLinkTest.php

示例6: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('comment');
     $this->installEntitySchema('node');
     $this->executeMigration('d7_view_modes');
 }
開發者ID:aWEBoLabs,項目名稱:taxi,代碼行數:10,代碼來源:MigrateViewModesTest.php

示例7: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('node');
     $this->installEntitySchema('comment');
     $this->installEntitySchema('taxonomy_term');
     CommentType::create(['id' => 'comment_node_page', 'label' => $this->randomMachineName()])->save();
     CommentType::create(['id' => 'comment_node_article', 'label' => $this->randomMachineName()])->save();
     CommentType::create(['id' => 'comment_node_blog', 'label' => $this->randomMachineName()])->save();
     CommentType::create(['id' => 'comment_node_book', 'label' => $this->randomMachineName()])->save();
     CommentType::create(['id' => 'comment_node_forum', 'label' => $this->randomMachineName()])->save();
     CommentType::create(['id' => 'comment_node_test_content_type', 'label' => $this->randomMachineName()])->save();
     NodeType::create(['type' => 'page', 'label' => $this->randomMachineName()])->save();
     NodeType::create(['type' => 'article', 'label' => $this->randomMachineName()])->save();
     NodeType::create(['type' => 'blog', 'label' => $this->randomMachineName()])->save();
     NodeType::create(['type' => 'book', 'label' => $this->randomMachineName()])->save();
     NodeType::create(['type' => 'forum', 'label' => $this->randomMachineName()])->save();
     NodeType::create(['type' => 'test_content_type', 'label' => $this->randomMachineName()])->save();
     Vocabulary::create(['vid' => 'test_vocabulary'])->save();
     // Give one unfortunate field instance invalid display settings to ensure
     // that the migration provides an empty array as a default (thus avoiding
     // an "unsupported operand types" fatal).
     Database::getConnection('default', 'migrate')->update('field_config_instance')->fields(array('data' => serialize(array('label' => 'Body', 'widget' => array('type' => 'text_textarea_with_summary', 'settings' => array('rows' => 20, 'summary_rows' => 5), 'weight' => -4, 'module' => 'text'), 'settings' => array('display_summary' => TRUE, 'text_processing' => 1, 'user_register_form' => FALSE), 'display' => array('default' => array('label' => 'hidden', 'type' => 'text_default', 'settings' => array(), 'module' => 'text', 'weight' => 0), 'teaser' => array('label' => 'hidden', 'type' => 'text_summary_or_trimmed', 'settings' => NULL, 'module' => 'text', 'weight' => 0)), 'required' => FALSE, 'description' => ''))))->condition('entity_type', 'node')->condition('bundle', 'article')->condition('field_name', 'body')->execute();
     $this->executeMigrations(['d7_field', 'd7_field_instance', 'd7_view_modes', 'd7_field_formatter_settings']);
 }
開發者ID:DrupalCamp-NYC,項目名稱:dcnyc16,代碼行數:28,代碼來源:MigrateFieldFormatterSettingsTest.php

示例8: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('aggregator_feed');
     $this->installEntitySchema('aggregator_item');
     $this->executeMigration('d7_aggregator_feed');
     $this->executeMigration('d7_aggregator_item');
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:11,代碼來源:MigrateAggregatorItemTest.php

示例9: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('node');
     $this->installEntitySchema('comment');
     $this->installConfig(static::$modules);
     $this->executeMigrations(['d7_user_role', 'd7_user', 'd7_node_type', 'd7_comment_type', 'd7_field', 'd7_field_instance', 'd7_node:page']);
 }
開發者ID:eric-shell,項目名稱:eric-shell-d8,代碼行數:11,代碼來源:Drupal7MigrationTest.php

示例10: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('node');
     $this->installConfig(static::$modules);
     $this->installSchema('node', ['node_access']);
     $this->installSchema('tracker', ['tracker_node', 'tracker_user']);
     $this->executeMigrations(['d7_user_role', 'd7_user', 'd7_node_type', 'd7_node', 'd7_tracker_node']);
 }
開發者ID:eigentor,項目名稱:tommiblog,代碼行數:12,代碼來源:MigrateTrackerUserTest.php

示例11: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('node');
     $this->installEntitySchema('comment');
     $this->installEntitySchema('taxonomy_term');
     $this->installConfig(static::$modules);
     $this->executeMigrations(['d7_node_type', 'd7_comment_type', 'd7_field', 'd7_field_instance', 'd7_field_instance_widget_settings']);
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:12,代碼來源:MigrateFieldInstanceWidgetSettingsTest.php

示例12: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('node');
     $this->installEntitySchema('comment');
     $this->installEntitySchema('taxonomy_term');
     $this->installEntitySchema('file');
     $this->installConfig(static::$modules);
     $this->installSchema('node', ['node_access']);
     $this->installSchema('system', ['sequences']);
     $this->executeMigrations(['d7_user_role', 'd7_user', 'd7_node_type', 'd7_comment_type', 'd7_field', 'd7_field_instance', 'd7_node:test_content_type', 'd7_node:article']);
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:15,代碼來源:MigrateNodeTest.php

示例13: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(static::$modules);
     $this->createType('page');
     $this->createType('article');
     $this->createType('blog');
     $this->createType('book');
     $this->createType('forum');
     $this->createType('test_content_type');
     $this->executeMigrations(['d7_field', 'd7_field_instance']);
 }
開發者ID:sgtsaughter,項目名稱:d8portfolio,代碼行數:15,代碼來源:MigrateFieldInstanceTest.php

示例14: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(static::$modules);
     $this->installEntitySchema('node');
     $this->installEntitySchema('comment');
     $this->executeMigrations(['d7_filter_format', 'd7_user_role', 'd7_user']);
     $this->executeMigration('d7_node_type');
     // We only need the test_content_type node migration to run for real, so
     // mock all the others.
     $this->prepareMigrations(array('d7_node' => array(array(array(0), array(0)))));
     $this->executeMigrations(['d7_node', 'd7_comment_type', 'd7_comment']);
 }
開發者ID:eigentor,項目名稱:tommiblog,代碼行數:16,代碼來源:MigrateCommentTest.php

示例15: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('node');
     $this->installEntitySchema('taxonomy_term');
     $this->installConfig(static::$modules);
     $this->installSchema('node', ['node_access']);
     $this->installSchema('system', ['sequences']);
     $this->executeMigration('d7_node_type');
     FieldStorageConfig::create(array('type' => 'entity_reference', 'field_name' => 'field_tags', 'entity_type' => 'node', 'settings' => array('target_type' => 'taxonomy_term'), 'cardinality' => FieldStorageConfigInterface::CARDINALITY_UNLIMITED))->save();
     FieldConfig::create(array('entity_type' => 'node', 'field_name' => 'field_tags', 'bundle' => 'article'))->save();
     $this->executeMigrations(['d7_taxonomy_vocabulary', 'd7_taxonomy_term', 'd7_user_role', 'd7_user', 'd7_node:article']);
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:16,代碼來源:MigrateNodeTaxonomyTest.php


注:本文中的Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。