• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP d6\MigrateDrupal6TestBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase的典型用法代码示例。如果您正苦于以下问题:PHP MigrateDrupal6TestBase类的具体用法?PHP MigrateDrupal6TestBase怎么用?PHP MigrateDrupal6TestBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了MigrateDrupal6TestBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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' => '[email protected]'])->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


示例16: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(['block_content']);
     $this->installEntitySchema('block_content');
     // Set Bartik and Seven as the default public and admin theme.
     $config = $this->config('system.theme');
     $config->set('default', 'bartik');
     $config->set('admin', 'seven');
     $config->save();
     // Install one of D8's test themes.
     \Drupal::service('theme_handler')->install(['test_theme']);
     $this->executeMigrations(['d6_filter_format', 'block_content_type', 'block_content_body_field', 'd6_custom_block', 'menu', 'd6_user_role', 'd6_block']);
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:17,代码来源:MigrateBlockTest.php


示例17: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('node');
     $this->installConfig(['node']);
     $this->installSchema('node', ['node_access']);
     $this->installSchema('system', ['sequences']);
     // Create a new user which needs to have UID 1, because that is expected by
     // the assertions from
     // \Drupal\migrate_drupal\Tests\d6\MigrateNodeRevisionTest.
     User::create(['uid' => 1, 'name' => $this->randomMachineName(), 'status' => 1])->enforceIsNew()->save();
     $this->migrateUsers(FALSE);
     $this->migrateFields();
     $this->executeMigration('d6_node_settings');
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:18,代码来源:MigrateNodeTestBase.php


示例18: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('file');
     $this->installSchema('file', ['file_usage']);
     $this->installEntitySchema('node');
     $this->installSchema('user', ['users_data']);
     // Make sure uid 1 is created.
     user_install();
     $file = File::create(array('fid' => 2, 'uid' => 2, 'filename' => 'image-test.jpg', 'uri' => "public://image-test.jpg", 'filemime' => 'image/jpeg', 'created' => 1, 'changed' => 1, 'status' => FILE_STATUS_PERMANENT));
     $file->enforceIsNew();
     file_put_contents($file->getFileUri(), file_get_contents('core/modules/simpletest/files/image-1.png'));
     $file->save();
     $file = File::create(array('fid' => 8, 'uid' => 8, 'filename' => 'image-test.png', 'uri' => "public://image-test.png", 'filemime' => 'image/png', 'created' => 1, 'changed' => 1, 'status' => FILE_STATUS_PERMANENT));
     $file->enforceIsNew();
     file_put_contents($file->getFileUri(), file_get_contents('core/modules/simpletest/files/image-2.jpg'));
     $file->save();
     $this->migrateUsers();
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:22,代码来源:MigrateUserTest.php


示例19: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(['image']);
 }
开发者ID:sojo,项目名称:d8_friendsofsilence,代码行数:8,代码来源:MigrateImageCacheTest.php


示例20: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->executeMigration('search_page');
 }
开发者ID:sojo,项目名称:d8_friendsofsilence,代码行数:8,代码来源:MigrateSearchPageTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP d7\MigrateDrupal7TestBase类代码示例发布时间:2022-05-23
下一篇:
PHP Unit\MigrateSqlSourceTestCase类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap