Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/dataninja.cn/core/modules/field/tests/src/Kernel/Migrate/d7/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/dataninja.cn/core/modules/field/tests/src/Kernel/Migrate/d7/RollbackViewModesTest.php

<?php

namespace Drupal\Tests\field\Kernel\Migrate\d7;

use Drupal\Core\Entity\Entity\EntityViewMode;
use Drupal\migrate\MigrateExecutable;

/**
 * Migrates and rolls back Drupal 7 view modes.
 *
 * @group field
 */
class RollbackViewModesTest extends MigrateViewModesTest {

  /**
   * {@inheritdoc}
   */
  public static $modules = ['text'];

  /**
   * Tests migrating D7 view modes, then rolling back.
   */
  public function testMigration() {
    // Test that the view modes have migrated (prior to rollback).
    parent::testMigration();

    $this->executeRollback('d7_view_modes');

    // Check that view modes have been rolled back.
    $view_mode_ids = [
      'comment.full',
      'node.teaser',
      'node.full',
      'user.full',
    ];
    foreach ($view_mode_ids as $view_mode_id) {
      $this->assertNull(EntityViewMode::load($view_mode_id));
    }
  }

  /**
   * Executes a single rollback.
   *
   * @param string|\Drupal\migrate\Plugin\MigrationInterface $migration
   *   The migration to rollback, or its ID.
   */
  protected function executeRollback($migration) {
    if (is_string($migration)) {
      $this->migration = $this->getMigration($migration);
    }
    else {
      $this->migration = $migration;
    }
    (new MigrateExecutable($this->migration, $this))->rollback();
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net