File tree Expand file tree Collapse file tree 4 files changed +17
-12
lines changed
app/code/Magento/Integration/Test/Unit Expand file tree Collapse file tree 4 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,10 @@ class ConsumerTest extends \PHPUnit_Framework_TestCase
39
39
40
40
protected function setUp ()
41
41
{
42
- $ this ->_consumerFactory = $ this ->getMockBuilder (
43
- 'Magento\Integration\Model\Oauth\ConsumerFactory '
44
- )->disableOriginalConstructor ()->getMock ();
42
+ $ this ->_consumerFactory = $ this ->getMockBuilder ('Magento\Integration\Model\Oauth\ConsumerFactory ' )
43
+ ->disableOriginalConstructor ()
44
+ ->setMethods (['create ' ])
45
+ ->getMock ();
45
46
$ this ->_consumerMock = $ this ->getMockBuilder (
46
47
'Magento\Integration\Model\Oauth\Consumer '
47
48
)->disableOriginalConstructor ()->getMock ();
Original file line number Diff line number Diff line change @@ -42,9 +42,10 @@ class IntegrationServiceTest extends \PHPUnit_Framework_TestCase
42
42
43
43
protected function setUp ()
44
44
{
45
- $ this ->_integrationFactory = $ this ->getMockBuilder (
46
- 'Magento\Integration\Model\IntegrationFactory '
47
- )->disableOriginalConstructor ()->getMock ();
45
+ $ this ->_integrationFactory = $ this ->getMockBuilder ('Magento\Integration\Model\IntegrationFactory ' )
46
+ ->disableOriginalConstructor ()
47
+ ->setMethods (['create ' ])
48
+ ->getMock ();
48
49
$ this ->_integrationMock = $ this ->getMockBuilder (
49
50
'Magento\Integration\Model\Integration '
50
51
)->disableOriginalConstructor ()->setMethods (
Original file line number Diff line number Diff line change @@ -51,9 +51,10 @@ class OauthServiceTest extends \PHPUnit_Framework_TestCase
51
51
*/
52
52
protected function setUp ()
53
53
{
54
- $ this ->_consumerFactory = $ this ->getMockBuilder (
55
- 'Magento\Integration\Model\Oauth\ConsumerFactory '
56
- )->disableOriginalConstructor ()->getMock ();
54
+ $ this ->_consumerFactory = $ this ->getMockBuilder ('Magento\Integration\Model\Oauth\ConsumerFactory ' )
55
+ ->disableOriginalConstructor ()
56
+ ->setMethods (['create ' ])
57
+ ->getMock ();
57
58
$ this ->_tokenProviderMock = $ this ->getMockBuilder (
58
59
'Magento\Integration\Model\Oauth\Token\Provider '
59
60
)->disableOriginalConstructor ()->getMock ();
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ public function setUp()
59
59
{
60
60
$ this ->_consumerFactory = $ this ->getMockBuilder ('Magento\Integration\Model\Oauth\ConsumerFactory ' )
61
61
->disableOriginalConstructor ()
62
+ ->setMethods (['create ' ])
62
63
->getMock ();
63
64
$ this ->_consumerMock = $ this ->getMockBuilder ('Magento\Integration\Model\Oauth\Consumer ' )
64
65
->disableOriginalConstructor ()->setMethods (
@@ -79,9 +80,10 @@ public function setUp()
79
80
$ this ->_consumerFactory ->expects ($ this ->any ())
80
81
->method ('create ' )
81
82
->will ($ this ->returnValue ($ this ->_consumerMock ));
82
- $ this ->_nonceFactory = $ this ->getMockBuilder (
83
- 'Magento\Integration\Model\Oauth\NonceFactory '
84
- )->disableOriginalConstructor ()->getMock ();
83
+ $ this ->_nonceFactory = $ this ->getMockBuilder ('Magento\Integration\Model\Oauth\NonceFactory ' )
84
+ ->disableOriginalConstructor ()
85
+ ->setMethods (['create ' ])
86
+ ->getMock ();
85
87
$ this ->_tokenFactory = $ this ->getMockBuilder (
86
88
'Magento\Integration\Model\Oauth\TokenFactory '
87
89
)->disableOriginalConstructor ()->setMethods (['create ' ])->getMock ();
You can’t perform that action at this time.
0 commit comments