File tree Expand file tree Collapse file tree 4 files changed +5
-18
lines changed
dev/tests/functional/tests/app/Magento
ImportExport/Test/Block/Adminhtml/Import/Edit Expand file tree Collapse file tree 4 files changed +5
-18
lines changed Original file line number Diff line number Diff line change 7
7
8
8
use Magento \Mtf \Constraint \AbstractConstraint ;
9
9
use Magento \Mtf \Util \Command \File \ExportInterface ;
10
- use \DateTime ;
11
10
12
11
/**
13
12
* Assert that date fields in exported file are shown in global configuration time zone.
@@ -18,10 +17,10 @@ class AssertExportProductDate extends AbstractConstraint
18
17
* Assert that date fields in exported file are shown in global configuration time zone.
19
18
*
20
19
* @param ExportInterface $export
21
- * @param DateTime $dateTime
20
+ * @param \ DateTime $dateTime
22
21
* @return void
23
22
*/
24
- public function processAssert (ExportInterface $ export , DateTime $ dateTime )
23
+ public function processAssert (ExportInterface $ export , \ DateTime $ dateTime )
25
24
{
26
25
$ exportData = $ export ->getLatest ();
27
26
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class AssertImportProduct extends AbstractConstraint
46
46
private $ import ;
47
47
48
48
/**
49
- * Edit page on backend
49
+ * Edit page in Admin.
50
50
*
51
51
* @var CatalogProductEdit
52
52
*/
@@ -145,16 +145,7 @@ private function getResultCsv($productSku)
145
145
*/
146
146
protected function getResultProductsData (array $ productsData )
147
147
{
148
- $ resultProductsData = [];
149
- array_walk_recursive (
150
- $ productsData ,
151
- function ($ value , $ key ) use (&$ resultProductsData ) {
152
- if (array_search ($ key , $ this ->neededKeys )) {
153
- $ resultProductsData [$ key ] = $ value ;
154
- }
155
- }
156
- );
157
- return $ resultProductsData ;
148
+ return array_intersect_key ($ productsData , array_flip ($ this ->neededKeys ));
158
149
}
159
150
160
151
/**
Original file line number Diff line number Diff line change 33
33
<constraint name =" Magento\CatalogImportExport\Test\Constraint\AssertImportProduct" />
34
34
<constraint name =" Magento\CatalogImportExport\Test\Constraint\AssertEntitiesInGrid" />
35
35
</variation >
36
- <variation name =" ImportProductVariation2" ticketId =" MAGETWO-47719" summary =" Import Products with Replace Behavior" >
36
+ <variation name =" ImportProductVariation2" ticketId =" MAGETWO-47719" summary =" Import Products assigned to different websites with Replace Behavior" >
37
37
<data name =" import/data/entity" xsi : type =" string" >Products</data >
38
38
<data name =" import/data/behavior" xsi : type =" string" >Replace</data >
39
39
<data name =" import/data/validation_strategy" xsi : type =" string" >Stop on Error</data >
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ class Form extends \Magento\Mtf\Block\Form
23
23
public function fill (FixtureInterface $ fixture , SimpleElement $ element = null )
24
24
{
25
25
$ data = $ fixture ->getData ();
26
- $ importFile = $ data ['import_file ' ];
27
- unset($ data ['import_file ' ]);
28
- $ data ['import_file ' ] = $ importFile ;
29
26
$ fields = isset ($ data ['fields ' ]) ? $ data ['fields ' ] : $ data ;
30
27
$ mapping = $ this ->dataMapping ($ fields );
31
28
$ this ->_fill ($ mapping , $ element );
You can’t perform that action at this time.
0 commit comments