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

PHP d7\MigrateDrupal7TestBase类代码示例

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

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



在下文中一共展示了MigrateDrupal7TestBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('comment');
     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();
     $this->installEntitySchema('node');
     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();
     // 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->executeMigration('d7_field');
     $this->executeMigration('d7_field_instance');
     $this->executeMigration('d7_view_modes');
     $this->executeMigration('d7_field_formatter_settings');
 }
开发者ID:ravindrasingh22,项目名称:Drupal-8-rc,代码行数:29,代码来源:MigrateFieldFormatterSettingsTest.php


示例2: 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:ddrozdik,项目名称:dmaps,代码行数:10,代码来源:MigrateCustomBlockTest.php


示例3: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(['block_content']);
     $this->installEntitySchema('block_content');
     $this->executeMigrations(['block_content_type', 'block_content_body_field']);
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:10,代码来源:MigrateBlockContentBodyFieldTest.php


示例4: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('comment');
     $this->installEntitySchema('node');
     $this->executeMigration('d7_view_modes');
 }
开发者ID:neetumorwani,项目名称:blogging,代码行数:10,代码来源:MigrateViewModesTest.php


示例5: 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:ddrozdik,项目名称:dmaps,代码行数:10,代码来源:MigrateUserTest.php


示例6: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(static::$modules);
     $this->loadDumps(['Variable.php']);
     $this->executeMigration('d7_dblog_settings');
 }
开发者ID:nsp15,项目名称:Drupal8,代码行数:10,代码来源:MigrateDblogConfigsTest.php


示例7: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(static::$modules);
     $this->executeMigration('d7_node_type');
     $this->executeMigration('d7_comment_type');
 }
开发者ID:ravindrasingh22,项目名称:Drupal-8-rc,代码行数:10,代码来源:MigrateCommentTypeTest.php


示例8: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(static::$modules);
     $this->installEntitySchema('node');
     $this->executeMigrations(['d7_node_type', 'd7_node_title_label']);
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:10,代码来源:MigrateNodeTitleLabelTest.php


示例9: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->executeMigration('user_picture_field');
     $this->executeMigration('user_picture_field_instance');
     $this->executeMigration('user_picture_entity_form_display');
 }
开发者ID:ravindrasingh22,项目名称:Drupal-8-rc,代码行数:10,代码来源:MigrateUserPictureEntityFormDisplayTest.php


示例10: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(['statistics']);
     $this->loadDumps(['Variable.php']);
     $this->executeMigration('statistics_popular_block_settings');
 }
开发者ID:Nesta,项目名称:luismagonzalez,代码行数:10,代码来源:MigrateStatisticsPopularBlockSettingsTest.php


示例11: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installSchema('system', ['router']);
     $this->installEntitySchema('menu_link_content');
     $this->executeMigration('menu');
 }
开发者ID:ravindrasingh22,项目名称:Drupal-8-rc,代码行数:10,代码来源:MigrateMenuLinkTest.php


示例12: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('file');
     $this->executeMigration('user_picture_field');
     $this->executeMigration('user_picture_field_instance');
     $this->executeMigration('user_picture_entity_display');
 }
开发者ID:ravindrasingh22,项目名称:Drupal-8-rc,代码行数:11,代码来源:MigrateUserPictureEntityDisplayTest.php


示例13: 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:HakS,项目名称:drupal8_training,代码行数:11,代码来源:MigrateAggregatorItemTest.php


示例14: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installSchema('system', ['router']);
     $this->installEntitySchema('menu_link_content');
     $this->executeMigration('menu');
     \Drupal::service('router.builder')->rebuild();
 }
开发者ID:isramv,项目名称:camp-gdl,代码行数:11,代码来源:MigrateMenuLinkTest.php


示例15: 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:komejo,项目名称:article-test,代码行数:12,代码来源:MigrateFieldInstanceWidgetSettingsTest.php


示例16: 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__test_content_type', 'd7_tracker_node']);
 }
开发者ID:komejo,项目名称:article-test,代码行数:12,代码来源:MigrateTrackerUserTest.php


示例17: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installConfig(static::$modules);
     $this->executeMigration('d7_node_type');
     $this->executeMigration('d7_comment_type');
     $this->executeMigration('d7_comment_field');
     $this->executeMigration('d7_comment_field_instance');
     $this->executeMigration('d7_comment_entity_form_display');
 }
开发者ID:ravindrasingh22,项目名称:Drupal-8-rc,代码行数:13,代码来源:MigrateCommentEntityFormDisplayTest.php


示例18: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('node');
     $this->installEntitySchema('comment');
     $this->installEntitySchema('taxonomy_term');
     $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']);
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:14,代码来源:MigrateNodeTest.php


示例19: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installSchema('system', array('router'));
     $this->installEntitySchema('shortcut');
     $this->installEntitySchema('menu_link_content');
     $this->executeMigration('d7_shortcut_set');
     $this->executeMigration('menu');
     $this->executeMigration('d7_menu_links');
     $this->executeMigration('d7_shortcut');
 }
开发者ID:ddrozdik,项目名称:dmaps,代码行数:14,代码来源:MigrateShortcutSetTest.php


示例20: setUp

 /**
  * {@inheritdoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->installEntitySchema('node');
     $this->installConfig(['node']);
     $this->installSchema('node', ['node_access']);
     $this->installSchema('system', ['sequences']);
     $this->executeMigration('d7_user_role');
     $this->executeMigration('d7_user');
     $this->executeMigration('d7_node_type');
     $this->executeMigration('d7_node__test_content_type');
 }
开发者ID:ravindrasingh22,项目名称:Drupal-8-rc,代码行数:15,代码来源:MigrateNodeTest.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP node\NodeInterface类代码示例发布时间:2022-05-23
下一篇:
PHP d6\MigrateDrupal6TestBase类代码示例发布时间: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