public function testFormatIsNotSupportedAfterDisablingFormat() { $this->setExpectedException('Distill\\Exception\\IO\\Input\\FileFormatNotSupportedException'); $target = $this->getTemporaryPath(); $this->clearTemporaryPath(); $this->distill->disableFormat(Format\Zip::getName())->extract($this->filesPath . 'file_ok.zip', $target, new Format\Zip()); }
public function testFormatIsNotSupportedAfterDisablingFormat() { $this->setExpectedException('Distill\\Exception\\IO\\Input\\FileFormatNotSupportedException'); $target = $this->getTemporaryPath(); $this->clearTemporaryPath(); try { $this->distill->disableFormat(Format\Simple\Zip::getName())->extract($this->filesPath . 'file_ok.zip', $target, new Format\Simple\Zip()); } catch (Exception\IO\Input\FileFormatNotSupportedException $e) { $this->assertEquals($this->filesPath . 'file_ok.zip', $e->getFilename()); $this->assertInstanceOf('Distill\\Format\\Simple\\Zip', $e->getFormat()); throw $e; } }