13
13
use Magento \Framework \Escaper ;
14
14
use Magento \Framework \TestFramework \Unit \Helper \ObjectManager as ObjectManagerHelper ;
15
15
use Magento \ImportExport \Block \Adminhtml \Grid \Column \Renderer \Download ;
16
+ use PHPUnit \Framework \MockObject \MockObject ;
16
17
use PHPUnit \Framework \TestCase ;
17
18
18
19
/**
21
22
class DownloadTest extends TestCase
22
23
{
23
24
/**
24
- * @var Context
25
+ * @var Context|MockObject
25
26
*/
26
27
protected $ context ;
27
28
@@ -36,7 +37,7 @@ class DownloadTest extends TestCase
36
37
protected $ download ;
37
38
38
39
/**
39
- * @var Escaper|\PHPUnit_Framework_MockObject_MockObjecti
40
+ * @var Escaper|MockObject
40
41
*/
41
42
private $ escaperMock ;
42
43
@@ -48,7 +49,7 @@ protected function setUp(): void
48
49
$ this ->escaperMock = $ this ->createMock (Escaper::class);
49
50
$ urlModel = $ this ->createPartialMock (Url::class, ['getUrl ' ]);
50
51
$ urlModel ->expects ($ this ->any ())->method ('getUrl ' )->willReturn ('url ' );
51
- $ this ->context = $ this ->createPartialMock (Context::class, ['getUrlBuilder ' ]);
52
+ $ this ->context = $ this ->createPartialMock (Context::class, ['getUrlBuilder ' , ' getEscaper ' ]);
52
53
$ this ->context ->expects ($ this ->any ())->method ('getUrlBuilder ' )->willReturn ($ urlModel );
53
54
$ this ->context ->expects ($ this ->any ())->method ('getEscaper ' )->willReturn ($ this ->escaperMock );
54
55
$ data = [];
@@ -58,7 +59,7 @@ protected function setUp(): void
58
59
Download::class,
59
60
[
60
61
'context ' => $ this ->context ,
61
- 'data ' => $ data
62
+ 'data ' => $ data,
62
63
]
63
64
);
64
65
}
0 commit comments