public function CommerceRefreshModeTest::providerTestCommercePrice in Commerce Migrate 8.2
Same name and namespace in other branches
- 3.1.x modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceRefreshModeTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommerceRefreshModeTest::providerTestCommercePrice()
- 3.0.x modules/commerce/tests/src/Unit/Plugin/migrate/process/commerce1/CommerceRefreshModeTest.php \Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1\CommerceRefreshModeTest::providerTestCommercePrice()
Data provider for testSubstr().
File
- modules/
commerce/ tests/ src/ Unit/ Plugin/ migrate/ process/ commerce1/ CommerceRefreshModeTest.php, line 32
Class
- CommerceRefreshModeTest
- Tests the CommerceRefreshMode plugin.
Namespace
Drupal\Tests\commerce_migrate_commerce\Unit\Plugin\migrate\process\commerce1Code
public function providerTestCommercePrice() {
// Valid cases.
$tests[0]['value'] = [
'always',
'not_owner_only',
];
$tests[0]['new_value'] = 'always';
$tests[0]['value'] = [
'always',
'owner_only',
];
$tests[0]['new_value'] = 'always';
$tests[1]['value'] = [
FALSE,
'not_owner_only',
];
$tests[1]['new_value'] = 'customer';
$tests[2]['value'] = [
FALSE,
'owner_only',
];
$tests[2]['new_value'] = 'customer';
// Invalid input, string.
$tests[3]['value'] = 'string';
$tests[3]['new_value'] = NULL;
// Invalid input, integer.
$tests[4]['value'] = 1;
$tests[4]['new_value'] = NULL;
// Invalid input, empty array.
$tests[5]['value'] = [];
$tests[5]['new_value'] = NULL;
return $tests;
}