You are here

public function SuggestedProductsTest::testSuggestedProducts in Commerce Migrate 3.1.x

Same name and namespace in other branches
  1. 8.2 modules/csv_example/tests/src/Unit/Plugin/migrate/process/SuggestedProductsTest.php \Drupal\Tests\commerce_migrate_csv_example\Unit\Plugin\migrate\process\SuggestedProductsTest::testSuggestedProducts()
  2. 3.0.x modules/csv_example/tests/src/Unit/Plugin/migrate/process/SuggestedProductsTest.php \Drupal\Tests\commerce_migrate_csv_example\Unit\Plugin\migrate\process\SuggestedProductsTest::testSuggestedProducts()

Tests the suggested products process plugin.

@dataProvider providerTestSuggestedProducts

File

modules/csv_example/tests/src/Unit/Plugin/migrate/process/SuggestedProductsTest.php, line 22

Class

SuggestedProductsTest
Tests the suggested products process plugin.

Namespace

Drupal\Tests\commerce_migrate_csv_example\Unit\Plugin\migrate\process

Code

public function testSuggestedProducts($value = NULL, $expected = NULL) {
  $configuration = [];
  $this->plugin = new SuggestedProducts($configuration, 'map', []);
  $value = $this->plugin
    ->transform($value, $this->migrateExecutable, $this->row, 'foo');
  $this
    ->assertSame($expected, $value);
}