/** * Setting Mode * * @return void */ public function testGzGetSetMode() { $filter = new GzCompression(); $this->assertEquals('compress', $filter->getMode()); $filter->setMode('deflate'); $this->assertEquals('deflate', $filter->getOptions('mode')); $this->setExpectedException('Zend\\Filter\\Exception\\InvalidArgumentException', 'mode not supported'); $filter->setMode('unknown'); }
/** * Setting Mode * * @return void */ public function testGzGetSetMode() { $filter = new GzCompression(); $this->assertEquals('compress', $filter->getMode()); $filter->setMode('deflate'); $this->assertEquals('deflate', $filter->getOptions('mode')); try { $filter->setMode('unknown'); $this->fail('Exception expected'); } catch (\Zend\Filter\Exception $e) { $this->assertContains('mode not supported', $e->getMessage()); } }