Ejemplo n.º 1
0
 protected function _setupUrlMocks($size = self::FILE_SIZE, $url = self::URL, $additionalStatData = [])
 {
     $this->_handleMock->expects($this->any())->method('stat')->will($this->returnValue(array_merge(['size' => $size, 'type' => self::MIME_TYPE], $additionalStatData)));
     $this->fileReadFactory->expects($this->once())->method('create')->will($this->returnValue($this->_handleMock));
     $this->_helper->setResource($url, DownloadHelper::LINK_TYPE_URL);
 }
Ejemplo n.º 2
0
 protected function _setupUrlMocks($size = self::FILE_SIZE, $url = self::URL, $additionalStatData = array())
 {
     $this->_handleMock->expects($this->any())->method('stat')->will($this->returnValue(array_merge(array('size' => $size, 'type' => self::MIME_TYPE), $additionalStatData)));
     $this->_filesystemMock->expects($this->once())->method('getRemoteResource')->with($url)->will($this->returnValue($this->_handleMock));
     $this->_helper->setResource($url, DownloadHelper::LINK_TYPE_URL);
 }