File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
app/code/Magento/Analytics/Test/Unit/Model/Connector/Http/Client Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Analytics \Test \Unit \Model \Connector \Http \Client ;
7
7
8
+ use Magento \Framework \HTTP \Adapter \CurlFactory ;
9
+
8
10
/**
9
11
* A unit test for testing of the CURL HTTP client.
10
12
*/
@@ -31,7 +33,7 @@ class CurlTest extends \PHPUnit_Framework_TestCase
31
33
private $ responseMock ;
32
34
33
35
/**
34
- * @var \Magento\Framework\HTTP\Adapter\ CurlFactory|\PHPUnit_Framework_MockObject_MockObject
36
+ * @var CurlFactory|\PHPUnit_Framework_MockObject_MockObject
35
37
*/
36
38
private $ curlFactoryMock ;
37
39
@@ -68,11 +70,10 @@ protected function setUp()
68
70
->disableOriginalConstructor ()
69
71
->getMock ();
70
72
71
- $ this ->curlFactoryMock = $ this ->getMockBuilder (
72
- \Magento \Framework \HTTP \Adapter \CurlFactory::class
73
- )
74
- ->disableOriginalConstructor ()
75
- ->getMock ();
73
+ $ this ->curlFactoryMock = $ this ->getMockBuilder (CurlFactory::class)
74
+ ->setMethods (['create ' ])
75
+ ->disableOriginalConstructor ()
76
+ ->getMock ();
76
77
$ this ->curlFactoryMock ->expects ($ this ->any ())
77
78
->method ('create ' )
78
79
->willReturn ($ this ->curlMock );
You can’t perform that action at this time.
0 commit comments