本文整理汇总了PHP中Magento\Framework\App\Filesystem::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP Filesystem::expects方法的具体用法?PHP Filesystem::expects怎么用?PHP Filesystem::expects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\App\Filesystem
的用法示例。
在下文中一共展示了Filesystem::expects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
protected function setUp()
{
$this->_requestMock = $this->getMock('Magento\\Core\\Model\\File\\Storage\\Request', array(), array(), '', false);
$this->_closure = function () {
return true;
};
$this->_objectManagerMock = $this->getMock('Magento\\Framework\\ObjectManager');
$this->_configMock = $this->getMock('Magento\\Core\\Model\\File\\Storage\\Config', array(), array(), '', false);
$this->_sync = $this->getMock('Magento\\Core\\Model\\File\\Storage\\Synchronization', array(), array(), '', false);
$this->_dirVerificationMock = $this->getMock('Magento\\Framework\\App\\Filesystem\\DirectoryList\\Verification', array(), array(), '', false);
$this->filesystemMock = $this->getMock('Magento\\Framework\\App\\Filesystem', array(), array(), '', false);
$this->directoryReadMock = $this->getMock('Magento\\Framework\\Filesystem\\Directory\\Read', array(), array(), '', false);
$this->filesystemMock->expects($this->any())->method('getDirectoryRead')->with(\Magento\Framework\App\Filesystem::MEDIA_DIR)->will($this->returnValue($this->directoryReadMock));
$this->_responseMock = $this->getMock('Magento\\Core\\Model\\File\\Storage\\Response', array(), array(), '', false);
$map = array(array('Magento\\Framework\\App\\Filesystem\\DirectoryList\\Verification', $this->_dirVerificationMock), array('Magento\\Core\\Model\\File\\Storage\\Request', $this->_requestMock), array('Magento\\Core\\Model\\File\\Storage\\Synchronization', $this->_sync));
$this->_model = new \Magento\Core\App\Media($this->_objectManagerMock, $this->_requestMock, $this->_responseMock, $this->_closure, 'baseDir', 'mediaDirectory', 'var', 'params', $this->filesystemMock);
$this->_objectManagerMock->expects($this->any())->method('get')->will($this->returnValueMap($map));
}