File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
app/code/Magento/Eav/Test/Unit/Model/Adminhtml/System/Config/Source Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,20 @@ class InputtypeTest extends \PHPUnit\Framework\TestCase
14
14
15
15
protected function setUp ()
16
16
{
17
- $ this ->model = new \Magento \Eav \Model \Adminhtml \System \Config \Source \Inputtype ();
17
+ $ this ->model = new \Magento \Eav \Model \Adminhtml \System \Config \Source \Inputtype (
18
+ $ this ->getOptionsArray ()
19
+ );
18
20
}
19
21
20
22
public function testToOptionArray ()
21
23
{
22
- $ expectedResult = [
24
+ $ expectedResult = $ this ->getOptionsArray ();
25
+ $ this ->assertEquals ($ expectedResult , $ this ->model ->toOptionArray ());
26
+ }
27
+
28
+ private function getOptionsArray ()
29
+ {
30
+ return [
23
31
['value ' => 'text ' , 'label ' => 'Text Field ' ],
24
32
['value ' => 'textarea ' , 'label ' => 'Text Area ' ],
25
33
['value ' => 'texteditor ' , 'label ' => 'Text Editor ' ],
@@ -28,6 +36,5 @@ public function testToOptionArray()
28
36
['value ' => 'multiselect ' , 'label ' => 'Multiple Select ' ],
29
37
['value ' => 'select ' , 'label ' => 'Dropdown ' ]
30
38
];
31
- $ this ->assertEquals ($ expectedResult , $ this ->model ->toOptionArray ());
32
39
}
33
40
}
You can’t perform that action at this time.
0 commit comments