File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
app/code/Magento/GiftMessage/Test/Unit/Model/Type/Plugin Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,11 @@ protected function setUp()
41
41
);
42
42
}
43
43
44
- public function testBeforeSetShippingMethods ()
44
+ /**
45
+ * @dataProvider beforeSetShippingMethodsDataProvider
46
+ * @param array|null $methods
47
+ */
48
+ public function testBeforeSetShippingMethods ($ methods )
45
49
{
46
50
$ this ->requestMock ->expects ($ this ->once ())
47
51
->method ('getParam ' )
@@ -52,6 +56,17 @@ public function testBeforeSetShippingMethods()
52
56
$ subjectMock ->expects ($ this ->once ())->method ('getQuote ' )->will ($ this ->returnValue ($ quoteMock ));
53
57
$ this ->messageMock ->expects ($ this ->once ())->method ('add ' )->with ('Expected Value ' , $ quoteMock );
54
58
55
- $ this ->plugin ->beforeSetShippingMethods ($ subjectMock , []);
59
+ $ this ->plugin ->beforeSetShippingMethods ($ subjectMock , $ methods );
60
+ }
61
+
62
+ /**
63
+ * @return array
64
+ */
65
+ public function beforeSetShippingMethodsDataProvider ()
66
+ {
67
+ return [
68
+ [null ],
69
+ [[]]
70
+ ];
56
71
}
57
72
}
You can’t perform that action at this time.
0 commit comments