本文整理匯總了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));
}