OrderProductNoCurrencyTest.php in Commerce Migrate 3.0.x
File
modules/ubercart/tests/src/Kernel/Plugin/migrate/source/OrderProductNoCurrencyTest.php
View source
<?php
namespace Drupal\Tests\commerce_migrate_ubercart\Kernel\Plugin\migrate\source;
class OrderProductNoCurrencyTest extends OrderProductCurrencyTest {
public static $modules = [
'migrate_drupal',
'commerce_migrate_ubercart',
];
public function providerSource() {
$tests = parent::providerSource();
foreach ($tests as &$test) {
foreach ($test['source_data']['uc_orders'] as &$data) {
unset($data['currency']);
}
foreach ($test['expected_data'] as &$data) {
$data['currency'] = 'USD';
foreach ($data['adjustments'] as &$adjustment) {
$adjustment['currency_code'] = 'USD';
}
}
}
return $tests;
}
}