File tree Expand file tree Collapse file tree 3 files changed +16
-12
lines changed
app/code/Magento/Config/Test/Unit Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,7 @@ public function initGroupDataProvider()
442
442
*
443
443
* @dataProvider initFieldsDataProvider
444
444
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
445
+ * @SuppressWarnings(PHPMD.ExcessiveParameterList)
445
446
*/
446
447
public function testInitFields (
447
448
$ backendConfigValue ,
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ protected function setUp()
48
48
$ objectManager ->setBackwardCompatibleProperty (
49
49
$ this ->_model ,
50
50
'elementVisibility ' ,
51
- $ this ->elementVisibilityMock
51
+ $ this ->elementVisibilityMock ,
52
+ \Magento \Config \Model \Config \Structure \AbstractElement::class
52
53
);
53
54
}
54
55
Original file line number Diff line number Diff line change @@ -25,27 +25,29 @@ class ElementVisibilityTest extends \PHPUnit_Framework_TestCase
25
25
*/
26
26
private $ secondVisibilityMock ;
27
27
28
+ protected function setUp ()
29
+ {
30
+ $ this ->firstVisibilityMock = $ this ->getMockBuilder (ElementVisibilityInterface::class)
31
+ ->getMockForAbstractClass ();
32
+ $ this ->secondVisibilityMock = $ this ->getMockBuilder (ElementVisibilityInterface::class)
33
+ ->getMockForAbstractClass ();
34
+
35
+ $ this ->model = new ElementVisibility ([$ this ->firstVisibilityMock , $ this ->secondVisibilityMock ]);
36
+ }
37
+
28
38
/**
29
39
* @expectedException \Magento\Framework\Exception\ConfigurationMismatchException
40
+ * @codingStandardsIgnoreStart
30
41
* @expectedExceptionMessage stdClass is not instance on Magento\Config\Model\Config\Structure\ElementVisibilityInterface
42
+ * @codingStandardsIgnoreEnd
31
43
*/
32
44
public function testException ()
33
45
{
34
46
$ visibility = [
35
47
'stdClass ' => new \StdClass ()
36
48
];
37
49
38
- $ model = new ElementVisibility ($ visibility );
39
- }
40
-
41
- protected function setUp ()
42
- {
43
- $ this ->firstVisibilityMock = $ this ->getMockBuilder (ElementVisibilityInterface::class)
44
- ->getMockForAbstractClass ();
45
- $ this ->secondVisibilityMock = $ this ->getMockBuilder (ElementVisibilityInterface::class)
46
- ->getMockForAbstractClass ();
47
-
48
- $ this ->model = new ElementVisibility ([$ this ->firstVisibilityMock , $ this ->secondVisibilityMock ]);
50
+ new ElementVisibility ($ visibility );
49
51
}
50
52
51
53
/**
You can’t perform that action at this time.
0 commit comments