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


PHP d6\MigrateDrupal6TestBase類代碼示例

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


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

示例1: setUp

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

示例2: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installSchema('node', ['node_access']);
     $this->migrateContent();
     $this->migrateTaxonomy();
 }
開發者ID:DrupalCamp-NYC,項目名稱:dcnyc16,代碼行數:10,代碼來源:MigrateTermNodeTest.php

示例3: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('file');
     $this->installEntitySchema('node');
     $this->installSchema('file', ['file_usage']);
     $this->installSchema('node', ['node_access']);
     $id_mappings = array('d6_file' => array());
     // Create new file entities.
     for ($i = 1; $i <= 3; $i++) {
         $file = File::create(array('fid' => $i, 'uid' => 1, 'filename' => 'druplicon.txt', 'uri' => "public://druplicon-{$i}.txt", 'filemime' => 'text/plain', 'created' => 1, 'changed' => 1, 'status' => FILE_STATUS_PERMANENT));
         $file->enforceIsNew();
         file_put_contents($file->getFileUri(), 'hello world');
         // Save it, inserting a new record.
         $file->save();
         $id_mappings['d6_file'][] = array(array($i), array($i));
     }
     $this->prepareMigrations($id_mappings);
     $this->migrateContent();
     // Since we are only testing a subset of the file migration, do not check
     // that the full file migration has been run.
     $migration = $this->getMigration('d6_upload');
     $migration->set('requirements', []);
     $this->executeMigration($migration);
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:28,代碼來源:MigrateUploadTest.php

示例4: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('aggregator_feed');
     $this->installEntitySchema('aggregator_item');
     $this->executeMigrations(['d6_aggregator_feed', 'd6_aggregator_item']);
 }
開發者ID:aWEBoLabs,項目名稱:taxi,代碼行數:10,代碼來源:MigrateAggregatorItemTest.php

示例5: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->executeMigrations(['user_profile_field', 'user_profile_field_instance', 'user_profile_entity_display', 'user_profile_entity_form_display']);
     $this->migrateUsers(FALSE);
     $this->executeMigration('d6_profile_values');
 }
開發者ID:aWEBoLabs,項目名稱:taxi,代碼行數:10,代碼來源:MigrateUserProfileValuesTest.php

示例6: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(['comment']);
     $this->migrateContentTypes();
     $this->executeMigrations(['d6_comment_type', 'd6_comment_field', 'd6_comment_field_instance']);
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:10,代碼來源:MigrateCommentVariableInstanceTest.php

示例7: setUp

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

示例8: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->migrateUsers(FALSE);
     $this->installSchema('user', ['users_data']);
     $this->executeMigration('d6_user_contact_settings');
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:10,代碼來源:MigrateUserContactSettingsTest.php

示例9: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installSchema('node', ['node_access']);
     $this->migrateContent(['revisions']);
     $this->migrateTaxonomy();
     $this->executeMigrations(['d6_term_node', 'd6_term_node_revision']);
 }
開發者ID:eigentor,項目名稱:tommiblog,代碼行數:11,代碼來源:MigrateTermNodeRevisionTest.php

示例10: setUp

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

示例11: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installSchema('book', ['book']);
     $this->installSchema('node', ['node_access']);
     $this->migrateContent();
     $this->executeMigrations(['d6_node', 'd6_book']);
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:11,代碼來源:MigrateBookTest.php

示例12: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(['node']);
     $this->executeMigration('d6_node_type');
     // Create a config entity that already exists.
     BaseFieldOverride::create(['field_name' => 'promote', 'entity_type' => 'node', 'bundle' => 'page'])->save();
     $this->executeMigrations(['d6_node_setting_promote', 'd6_node_setting_status', 'd6_node_setting_sticky']);
 }
開發者ID:aWEBoLabs,項目名稱:taxi,代碼行數:12,代碼來源:MigrateNodeBundleSettingsTest.php

示例13: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     // Create a field on the user entity so that we can test nested property
     // overwrites.
     // @see static::testOverwriteSelectedNestedProperty()
     FieldStorageConfig::create(['field_name' => 'signature', 'entity_type' => 'user', 'type' => 'text_long'])->save();
     FieldConfig::create(['field_name' => 'signature', 'entity_type' => 'user', 'bundle' => 'user'])->save();
     User::create(['uid' => 2, 'name' => 'Ford Prefect', 'mail' => 'ford.prefect@localhost', 'signature' => array(array('value' => 'Bring a towel.', 'format' => 'filtered_html')), 'init' => 'proto@zo.an'])->save();
     $this->executeMigrations(['d6_filter_format', 'd6_user_role']);
 }
開發者ID:aWEBoLabs,項目名稱:taxi,代碼行數:14,代碼來源:EntityContentBaseTest.php

示例14: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('file');
     /** @var \Drupal\migrate\Plugin\MigrationInterface $migration */
     $migration = $this->getMigration('d6_user_picture_file');
     $source = $migration->getSourceConfiguration();
     $source['site_path'] = 'core/modules/simpletest';
     $migration->set('source', $source);
     $this->executeMigration($migration);
 }
開發者ID:aWEBoLabs,項目名稱:taxi,代碼行數:14,代碼來源:MigrateUserPictureFileTest.php

示例15: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('node');
     $this->installEntitySchema('comment');
     $this->installSchema('comment', ['comment_entity_statistics']);
     $this->installConfig(['comment']);
     // The entity.node.canonical route must exist when the RDF hook is called.
     $this->container->get('router.builder')->rebuild();
     $this->migrateContent();
     $this->executeMigrations(['d6_node', 'd6_comment_type', 'd6_comment_field', 'd6_comment_field_instance', 'd6_comment_entity_display', 'd6_comment_entity_form_display', 'd6_comment']);
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:15,代碼來源:MigrateCommentTest.php


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