migrateContentTypes example


class MigrateNodeTitleLabelTest extends MigrateDrupal7TestBase {

  protected static $modules = ['node', 'text', 'menu_ui'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->migrateContentTypes();
    $this->executeMigration('d7_node_title_label');
  }

  /** * Asserts various aspects of a base_field_override entity. * * @param string $id * The override ID. * @param string $label * The label's expected (overridden) value. * * @internal */
/** * {@inheritdoc} */
  protected static $modules = ['node', 'comment', 'text', 'menu_ui'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->migrateContentTypes();
    $this->migrateCommentTypes();
    $this->executeMigrations([
      'd7_comment_field',
      'd7_comment_field_instance',
    ]);
  }

  /** * Asserts a comment field instance entity. * * @param string $bundle * The bundle ID. * @param string $field_name * The field name. * @param int $default_value * The field's default_value setting. * @param int $default_mode * The field's default_mode setting. * @param int $per_page * The field's per_page setting. * @param int $anonymous * The field's anonymous setting. * @param bool $form_location * The field's form_location setting. * @param int $preview * The field's preview setting. * * @internal */
/** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->installEntitySchema('node');
    $this->installConfig(static::$modules);
    $this->installSchema('node', ['node_access']);
    $this->installSchema('tracker', ['tracker_node', 'tracker_user']);

    $this->migrateContentTypes();
    $this->migrateUsers(FALSE);
    $this->executeMigrations([
      'd7_node',
      'd7_tracker_node',
    ]);
  }

  /** * Tests migration of tracker node table. */
  public function testMigrateTrackerNode() {
    

  protected function setUp(): void {
    parent::setUp();

    $this->installEntitySchema('node');
    $this->installEntitySchema('path_alias');
    $this->installConfig('node');
    $this->installSchema('node', ['node_access']);

    $this->migrateUsers(FALSE);
    $this->migrateContentTypes();
    $this->executeMigrations([
      'language',
      'd7_node',
    ]);
  }

  /** * Tests the URL alias migration. */
  public function testUrlAlias() {
    $path_alias = $this->loadPathAliasByConditions([
      
/** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->setUpCurrentUser();

    $this->installSchema('node', ['node_access']);

    $this->migrateUsers(FALSE);
    $this->migrateContentTypes();
    $this->executeMigrations([
      'language',
      'd7_language_types',
      'd7_language_negotiation_settings',
      'd7_node',
      'd7_node_translation',
    ]);
  }

  /** * Tests that not found node translations are redirected. */
/** * {@inheritdoc} */
  protected static $modules = ['comment', 'menu_ui'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->installConfig(['comment']);
    $this->migrateContentTypes();
    $this->executeMigrations([
      'd6_comment_type',
      'd6_comment_field',
      'd6_comment_field_instance',
      'd6_comment_entity_form_display',
    ]);
  }

  /** * Asserts various aspects of a comment component in an entity form display. * * @param string $id * The entity ID. * @param string $component_id * The ID of the form component. * * @internal */

  protected static $modules = ['node', 'text', 'menu_ui'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->migrateContentTypes();
  }

  /** * Tests a single node type. * * @param string $id * The node type ID. * @param string $label * The expected label. * @param string $description * The expected node type description. * @param string $help * The expected help text. * @param bool $display_submitted * If submission information is displayed. * @param bool $new_revision * If this is a new revision. * @param array|null $expected_available_menus * The expected menus. * @param string|null $expected_parent * The expected menu parents. * @param string|null $body_label * (optional) The label for the body field. * * @internal */
/** * {@inheritdoc} */
  protected static $modules = ['comment', 'menu_ui'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->installConfig(['comment']);
    $this->migrateContentTypes();
    $this->executeMigrations([
      'd6_node_type',
      'd6_comment_type',
      'd6_comment_field',
      'd6_comment_field_instance',
      'd6_comment_entity_display',
    ]);
  }

  /** * Asserts various aspects of a comment component in an entity view display. * * @param string $id * The entity ID. * @param string $component_id * The ID of the display component. * * @internal */
/** * {@inheritdoc} */
  protected static $modules = ['comment', 'menu_ui'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->installConfig(['comment']);
    $this->migrateContentTypes();
    $this->executeMigrations([
      'd6_comment_type',
      'd6_comment_field',
      'd6_comment_field_instance',
    ]);
  }

  /** * Asserts a comment field instance entity. * * @param string $bundle * The bundle ID. * @param string $field_name * The field name. * @param int $default_value * The field's default_value setting. * @param int $default_mode * The field's default_mode setting. * @param int $per_page * The field's per_page setting. * @param int $anonymous * The field's anonymous setting. * @param bool $form_location * The field's form_location setting. * @param int $preview * The field's preview setting. * * @internal */

  protected static $modules = ['taxonomy', 'menu_ui'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    // Execute Dependency Migrations.     $this->migrateContentTypes();
    $this->installEntitySchema('taxonomy_term');
    $this->executeMigrations([
      'd6_node_type',
      'd6_taxonomy_vocabulary',
      'd6_vocabulary_field',
    ]);
  }

  /** * Tests the Drupal 6 vocabulary-node type association to Drupal 8 migration. */
  
'text',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->installSchema('book', ['book']);
    $this->installSchema('node', ['node_access']);
    $this->migrateUsers(FALSE);
    $this->migrateContentTypes();
    $this->executeMigrations([
      'd7_node',
      'd7_book',
    ]);
  }

  /** * Tests the Drupal 7 book structure to Drupal 8 migration. */
  public function testBook() {
    $nodes = Node::loadMultiple([1, 2, 4, 6]);
    
'language',
    'content_translation',
    'menu_ui',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->migrateContentTypes();
    $this->executeMigrations([
      'language',
      'd7_language_content_settings',
    ]);
  }

  /** * Tests migration of content language settings. */
  public function testLanguageContent() {
    // Assert that a translatable content is still translatable.

  public function testUserRole(array $modules, array $migrations, array $role_data) {
    if ($modules) {
      // Install modules that have migrations that may provide permissions.       \Drupal::service('module_installer')->install($modules);
      $this->installEntitySchema('block_content');
      $this->installConfig(['block_content', 'comment']);
      $this->migrateContentTypes();
    }
    $this->executeMigrations($migrations);
    $id_map = $this->getMigration('d6_user_role')->getIdMap();

    // After all the migrations are run, there are changes to the permissions.     $this->assertRoles($role_data$id_map);

    $roles = [
      'anonymous1',
      'authenticated1',
      'administrator1',
      

  protected function setUp(): void {
    parent::setUp();

    $this->setUpCurrentUser();
    $this->installEntitySchema('menu_link_content');
    $this->installSchema('node', ['node_access']);
    $this->installConfig(static::$modules);

    $this->migrateUsers(FALSE);
    $this->migrateContentTypes();
    $this->executeMigrations([
      'language',
      'd7_language_content_settings',
      'd7_node',
      'd7_node_translation',
      'd7_menu',
      'd7_menu_links',
      'node_translation_menu_links',
    ]);
  }

  
/** * {@inheritdoc} */
  protected static $modules = ['node', 'comment', 'text', 'menu_ui'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->migrateContentTypes();
    $this->migrateCommentTypes();
    $this->executeMigrations([
      'd7_comment_field',
      'd7_comment_field_instance',
      'd7_comment_entity_display',
    ]);
  }

  /** * Asserts various aspects of a comment component in an entity view display. * * @param string $id * The entity ID. * @param string $component_id * The ID of the display component. * * @internal */
Home | Imprint | This part of the site doesn't use cookies.