/** * @expectedException \Magento\Framework\Filesystem\FilesystemException */ public function testFlushException() { $this->driver->expects($this->once())->method('fileFlush')->with($this->resource)->will($this->throwException(new \Magento\Framework\Filesystem\FilesystemException())); $this->file->flush(); }
/** * @expectedException \Magento\Framework\Exception\FileSystemException */ public function testFlushException() { $emptyTranslation = ''; $this->driver->expects($this->once())->method('fileFlush')->with($this->resource)->willThrowException(new FileSystemException(new Phrase($emptyTranslation))); $this->file->flush(); }