本文整理汇总了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');
}
示例2: setUp
/**
* {@inheritdoc}
*/
protected function setUp()
{
parent::setUp();
$this->installSchema('node', ['node_access']);
$this->migrateContent();
$this->migrateTaxonomy();
}
示例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);
}
示例4: setUp
/**
* {@inheritdoc}
*/
protected function setUp()
{
parent::setUp();
$this->installEntitySchema('aggregator_feed');
$this->installEntitySchema('aggregator_item');
$this->executeMigrations(['d6_aggregator_feed', 'd6_aggregator_item']);
}
示例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');
}
示例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']);
}
示例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']);
}
示例8: setUp
/**
* {@inheritdoc}
*/
protected function setUp()
{
parent::setUp();
$this->migrateUsers(FALSE);
$this->installSchema('user', ['users_data']);
$this->executeMigration('d6_user_contact_settings');
}
示例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']);
}
示例10: setUp
/**
* {@inheritdoc}
*/
protected function setUp()
{
parent::setUp();
$this->installEntitySchema('node');
$this->installEntitySchema('comment');
$this->installConfig(['node', 'comment']);
$this->executeMigration('d6_comment_type');
}
示例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']);
}
示例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']);
}
示例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']);
}
示例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);
}
示例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']);
}