本文整理汇总了PHP中Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase类的典型用法代码示例。如果您正苦于以下问题:PHP MigrateDrupal7TestBase类的具体用法?PHP MigrateDrupal7TestBase怎么用?PHP MigrateDrupal7TestBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MigrateDrupal7TestBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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');
}
示例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']);
}
示例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']);
}
示例4: setUp
/**
* {@inheritdoc}
*/
protected function setUp()
{
parent::setUp();
$this->installEntitySchema('comment');
$this->installEntitySchema('node');
$this->executeMigration('d7_view_modes');
}
示例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']);
}
示例6: setUp
/**
* {@inheritdoc}
*/
protected function setUp()
{
parent::setUp();
$this->installConfig(static::$modules);
$this->loadDumps(['Variable.php']);
$this->executeMigration('d7_dblog_settings');
}
示例7: setUp
/**
* {@inheritdoc}
*/
protected function setUp()
{
parent::setUp();
$this->installConfig(static::$modules);
$this->executeMigration('d7_node_type');
$this->executeMigration('d7_comment_type');
}
示例8: setUp
/**
* {@inheritdoc}
*/
protected function setUp()
{
parent::setUp();
$this->installConfig(static::$modules);
$this->installEntitySchema('node');
$this->executeMigrations(['d7_node_type', 'd7_node_title_label']);
}
示例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');
}
示例10: setUp
/**
* {@inheritdoc}
*/
protected function setUp()
{
parent::setUp();
$this->installConfig(['statistics']);
$this->loadDumps(['Variable.php']);
$this->executeMigration('statistics_popular_block_settings');
}
示例11: setUp
/**
* {@inheritdoc}
*/
protected function setUp()
{
parent::setUp();
$this->installSchema('system', ['router']);
$this->installEntitySchema('menu_link_content');
$this->executeMigration('menu');
}
示例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');
}
示例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');
}
示例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();
}
示例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']);
}