8
8
use Magento \Catalog \Model \Product \Configuration \Item \Option \OptionInterface ;
9
9
use Magento \Framework \App \Filesystem \DirectoryList ;
10
10
use Magento \Framework \Filesystem ;
11
- use Magento \Framework \Filesystem \Directory \ReadInterface ;
11
+ use Magento \Framework \Filesystem \Directory \WriteInterface ;
12
12
use Magento \Framework \Filesystem \DriverPool ;
13
13
14
14
/**
@@ -24,9 +24,9 @@ class FileTest extends \PHPUnit_Framework_TestCase
24
24
protected $ objectManager ;
25
25
26
26
/**
27
- * @var ReadInterface |\PHPUnit_Framework_MockObject_MockObject
27
+ * @var WriteInterface |\PHPUnit_Framework_MockObject_MockObject
28
28
*/
29
- protected $ rootDirectory ;
29
+ protected $ mediaDirectory ;
30
30
31
31
/**
32
32
* @var \Magento\MediaStorage\Helper\File\Storage\Database|\PHPUnit_Framework_MockObject_MockObject
@@ -61,13 +61,13 @@ protected function setUp()
61
61
->disableOriginalConstructor ()
62
62
->getMock ();
63
63
64
- $ this ->rootDirectory = $ this ->getMockBuilder (ReadInterface ::class)
64
+ $ this ->mediaDirectory = $ this ->getMockBuilder (WriteInterface ::class)
65
65
->getMock ();
66
66
67
67
$ this ->filesystemMock ->expects ($ this ->any ())
68
- ->method ('getDirectoryRead ' )
68
+ ->method ('getDirectoryWrite ' )
69
69
->with (DirectoryList::MEDIA , DriverPool::FILE )
70
- ->willReturn ($ this ->rootDirectory );
70
+ ->willReturn ($ this ->mediaDirectory );
71
71
72
72
$ this ->serializer = $ this ->getMockBuilder (\Magento \Framework \Serialize \Serializer \Json::class)
73
73
->disableOriginalConstructor ()
@@ -158,17 +158,17 @@ function ($value) {
158
158
->method ('getValue ' )
159
159
->will ($ this ->returnValue ($ quoteValue ));
160
160
161
- $ this ->rootDirectory ->expects ($ this ->any ())
161
+ $ this ->mediaDirectory ->expects ($ this ->any ())
162
162
->method ('isFile ' )
163
163
->with ($ this ->equalTo ($ quotePath ))
164
164
->will ($ this ->returnValue (true ));
165
165
166
- $ this ->rootDirectory ->expects ($ this ->any ())
166
+ $ this ->mediaDirectory ->expects ($ this ->any ())
167
167
->method ('isReadable ' )
168
168
->with ($ this ->equalTo ($ quotePath ))
169
169
->will ($ this ->returnValue (true ));
170
170
171
- $ this ->rootDirectory ->expects ($ this ->any ())
171
+ $ this ->mediaDirectory ->expects ($ this ->any ())
172
172
->method ('getAbsolutePath ' )
173
173
->will ($ this ->returnValue ('/file.path ' ));
174
174
0 commit comments