You are here

public function PaymentFoundTest::testPaymentMigrationsNotFound in Commerce Migrate 3.0.x

Same name and namespace in other branches
  1. 8.2 modules/ubercart/tests/src/Kernel/PaymentFoundTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\PaymentFoundTest::testPaymentMigrationsNotFound()
  2. 3.1.x modules/ubercart/tests/src/Kernel/PaymentFoundTest.php \Drupal\Tests\commerce_migrate_ubercart\Kernel\PaymentFoundTest::testPaymentMigrationsNotFound()

Tests payment migration discovery when commerce_payment is not installed.

File

modules/ubercart/tests/src/Kernel/PaymentFoundTest.php, line 52

Class

PaymentFoundTest
Tests that modules exist for all source and destination plugins.

Namespace

Drupal\Tests\commerce_migrate_ubercart\Kernel

Code

public function testPaymentMigrationsNotFound() {

  /** @var \Drupal\migrate\Plugin\MigrationPluginManager $plugin_manager */
  $plugin_manager = $this->container
    ->get('plugin.manager.migration');
  foreach ($this->paymentMigrations as $payment_migration) {
    $this
      ->expectException(PluginNotFoundException::class);
    $this
      ->expectExceptionMessage('The "' . $payment_migration . '" plugin does not exist.');
    $plugin_manager
      ->getDefinition($payment_migration);
  }
}