File tree 1 file changed +16
-1
lines changed
app/code/Magento/ImportExport/Test/Unit/Model/Import/Entity
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -126,14 +126,29 @@ public function testValidateDataColumnNameWithWhitespaces()
126
126
);
127
127
}
128
128
129
+ /**
130
+ * Test for method validateData()
131
+ *
132
+ * @covers \Magento\ImportExport\Model\Import\Entity\AbstractEntity::validateData
133
+ */
134
+ public function testValidateColumnName ()
135
+ {
136
+ $ this ->_createSourceAdapterMock (['Test_1 ' ]);
137
+ $ errorAggregator = $ this ->_model ->validateData ();
138
+ $ this ->assertArrayNotHasKey (
139
+ AbstractEntity::ERROR_CODE_COLUMN_NAME_INVALID ,
140
+ $ errorAggregator ->getRowsGroupedByErrorCode ()
141
+ );
142
+ }
143
+
129
144
/**
130
145
* Test for method validateData()
131
146
*
132
147
* @covers \Magento\ImportExport\Model\Import\Entity\AbstractEntity::validateData
133
148
*/
134
149
public function testValidateDataAttributeNames ()
135
150
{
136
- $ this ->_createSourceAdapterMock (['_test1 ' ]);
151
+ $ this ->_createSourceAdapterMock (['test.1 ' , ' @test ' ]);
137
152
$ errorAggregator = $ this ->_model ->validateData ();
138
153
$ this ->assertArrayHasKey (
139
154
AbstractEntity::ERROR_CODE_COLUMN_NAME_INVALID ,
You can’t perform that action at this time.
0 commit comments