1
1
<?php
2
2
/**
3
- * Copyright © 2013-2017 Magento, Inc. All rights reserved.
3
+ * Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
6
namespace Magento \Customer \Test \Unit \Model \Checkout ;
14
14
use Magento \Customer \Model \Form ;
15
15
use Magento \Store \Model \ScopeInterface ;
16
16
17
- class ConfigProviderTest extends \PHPUnit_Framework_TestCase
17
+ class ConfigProviderTest extends \PHPUnit \ Framework \TestCase
18
18
{
19
19
/**
20
20
* @var ConfigProvider
@@ -29,7 +29,7 @@ class ConfigProviderTest extends \PHPUnit_Framework_TestCase
29
29
/**
30
30
* @var UrlInterface|\PHPUnit_Framework_MockObject_MockObject
31
31
*/
32
- protected $ customerUrl ;
32
+ protected $ urlBuilder ;
33
33
34
34
/**
35
35
* @var ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject
@@ -41,6 +41,11 @@ class ConfigProviderTest extends \PHPUnit_Framework_TestCase
41
41
*/
42
42
protected $ store ;
43
43
44
+ /**
45
+ * @var Url|\PHPUnit_Framework_MockObject_MockObject
46
+ */
47
+ private $ customerUrl ;
48
+
44
49
protected function setUp ()
45
50
{
46
51
$ this ->storeManager = $ this ->getMockForAbstractClass (
@@ -50,10 +55,12 @@ protected function setUp()
50
55
false
51
56
);
52
57
53
- $ this ->customerUrl = $ this ->getMockBuilder (\Magento \Customer \Model \Url::class)
54
- ->disableOriginalConstructor ()
55
- ->setMethods (['getLoginUrl ' ])
56
- ->getMock ();
58
+ $ this ->urlBuilder = $ this ->getMockForAbstractClass (
59
+ \Magento \Framework \UrlInterface::class,
60
+ [],
61
+ '' ,
62
+ false
63
+ );
57
64
58
65
$ this ->scopeConfig = $ this ->getMockForAbstractClass (
59
66
\Magento \Framework \App \Config \ScopeConfigInterface::class,
@@ -71,10 +78,16 @@ protected function setUp()
71
78
['getBaseUrl ' ]
72
79
);
73
80
81
+ $ this ->customerUrl = $ this ->getMockBuilder (\Magento \Customer \Model \Url::class)
82
+ ->disableOriginalConstructor ()
83
+ ->setMethods (['getLoginUrl ' ])
84
+ ->getMock ();
85
+
74
86
$ this ->provider = new ConfigProvider (
75
- $ this ->customerUrl ,
87
+ $ this ->urlBuilder ,
76
88
$ this ->storeManager ,
77
- $ this ->scopeConfig
89
+ $ this ->scopeConfig ,
90
+ $ this ->customerUrl
78
91
);
79
92
}
80
93
0 commit comments