Skip to content

Commit 32d40de

Browse files
committed
[DownloadableImportExport] Cover Helper Data by Unit Test
1 parent efa362f commit 32d40de

File tree

1 file changed

+11
-10
lines changed
  • app/code/Magento/DownloadableImportExport/Test/Unit/Helper

1 file changed

+11
-10
lines changed

app/code/Magento/DownloadableImportExport/Test/Unit/Helper/DataTest.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
1212
use Magento\DownloadableImportExport\Helper\Data as HelperData;
13+
use Magento\DownloadableImportExport\Model\Import\Product\Type\Downloadable;
1314
use PHPUnit\Framework\TestCase;
1415

1516
class DataTest extends TestCase
@@ -50,15 +51,15 @@ public function isRowDownloadableEmptyOptionsDataProvider()
5051
return [
5152
'Data set include downloadable link and sample' => [
5253
[
53-
'downloadable_links' => 'https://magento2.com/download_link',
54-
'downloadable_samples' => 'https://magento2.com/sample_link'
54+
Downloadable::COL_DOWNLOADABLE_LINKS => 'https://magento2.com/download_link',
55+
Downloadable::COL_DOWNLOADABLE_SAMPLES => 'https://magento2.com/sample_link'
5556
],
5657
false
5758
],
5859
'Data set with empty' => [
5960
[
60-
'downloadable_links' => '',
61-
'downloadable_samples' => ''
61+
Downloadable::COL_DOWNLOADABLE_LINKS => '',
62+
Downloadable::COL_DOWNLOADABLE_SAMPLES => ''
6263
],
6364
true
6465
]
@@ -87,15 +88,15 @@ public function isRowDownloadableNoValidDataProvider()
8788
return [
8889
'Data set include downloadable link and sample' => [
8990
[
90-
'downloadable_links' => 'https://magento2.com/download_link',
91-
'downloadable_samples' => 'https://magento2.com/sample_link'
91+
Downloadable::COL_DOWNLOADABLE_LINKS => 'https://magento2.com/download_link',
92+
Downloadable::COL_DOWNLOADABLE_SAMPLES => 'https://magento2.com/sample_link'
9293
],
9394
true
9495
],
9596
'Data set with empty' => [
9697
[
97-
'downloadable_links' => '',
98-
'downloadable_samples' => ''
98+
Downloadable::COL_DOWNLOADABLE_LINKS => '',
99+
Downloadable::COL_DOWNLOADABLE_SAMPLES => ''
99100
],
100101
false
101102
]
@@ -267,11 +268,11 @@ public function getTypeByValueDataProvider()
267268
return [
268269
'Case File Option Value' => [
269270
'file1',
270-
'file'
271+
Downloadable::FILE_OPTION_VALUE
271272
],
272273
'Case url Option Value' => [
273274
'https://example.com',
274-
'url'
275+
Downloadable::URL_OPTION_VALUE
275276
]
276277
];
277278
}

0 commit comments

Comments
 (0)