8 use \Magento\Framework\Filesystem\File\WriteFactory;
17 $driverPool = $this->createPartialMock(\
Magento\Framework\
Filesystem\DriverPool::class, [
'getDriver']);
18 $driverPool->expects($this->never())->method(
'getDriver');
20 $driver = $this->getMockForAbstractClass(\
Magento\Framework\
Filesystem\DriverInterface::class);
21 $driver->expects($this->any())->method(
'isExists')->willReturn(
true);
28 $driverPool = $this->createPartialMock(\
Magento\Framework\
Filesystem\DriverPool::class, [
'getDriver']);
29 $driverMock = $this->getMockForAbstractClass(\
Magento\Framework\
Filesystem\DriverInterface::class);
30 $driverMock->expects($this->any())->method(
'isExists')->willReturn(
true);
31 $driverPool->expects($this->once())->method(
'getDriver')->willReturn($driverMock);
39 $driverPool = $this->createPartialMock(\
Magento\Framework\
Filesystem\DriverPool::class, [
'getDriver']);
40 $driverPool->expects($this->never())->method(
'getDriver');
41 $driver = $this->getMockForAbstractClass(\
Magento\Framework\
Filesystem\DriverInterface::class);
42 $driver->expects($this->any())->method(
'isExists')->willReturn(
true);
testCreateWithDriverCode()