当前位置: 首页>>代码示例>>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;未经允许,请勿转载。