Skip to content

Commit e55f834

Browse files
committed
MAGETWO-87776: Build stabilization
-fix unit tests
1 parent dc7d455 commit e55f834

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

app/code/Magento/Eav/Test/Unit/Model/Adminhtml/System/Config/Source/InputtypeTest.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,20 @@ class InputtypeTest extends \PHPUnit\Framework\TestCase
1414

1515
protected function setUp()
1616
{
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+
);
1820
}
1921

2022
public function testToOptionArray()
2123
{
22-
$expectedResult = [
24+
$expectedResult = $this->getOptionsArray();
25+
$this->assertEquals($expectedResult, $this->model->toOptionArray());
26+
}
27+
28+
private function getOptionsArray()
29+
{
30+
return [
2331
['value' => 'text', 'label' => 'Text Field'],
2432
['value' => 'textarea', 'label' => 'Text Area'],
2533
['value' => 'texteditor', 'label' => 'Text Editor'],
@@ -28,6 +36,5 @@ public function testToOptionArray()
2836
['value' => 'multiselect', 'label' => 'Multiple Select'],
2937
['value' => 'select', 'label' => 'Dropdown']
3038
];
31-
$this->assertEquals($expectedResult, $this->model->toOptionArray());
3239
}
3340
}

0 commit comments

Comments
 (0)