Пример #1
0
 /**
  * @expectedException \Magento\Framework\Model\Exception
  */
 public function testUploadInvalidJsFile()
 {
     $fileName = 'file.name';
     $this->_service = new \Magento\Theme\Model\Uploader\Service($this->_filesystemMock, $this->_fileSizeMock, $this->_uploaderFactory, ['js' => '100M']);
     $this->_uploader->expects($this->once())->method('getFileSize')->will($this->returnValue(499 * self::MB_MULTIPLIER));
     $this->_service->uploadJsFile($fileName);
 }