Example #1
0
 /**
  * Setting Level
  *
  * @return void
  */
 public function testGzGetSetLevel()
 {
     $filter = new GzCompression();
     $this->assertEquals(9, $filter->getLevel());
     $filter->setLevel(6);
     $this->assertEquals(6, $filter->getOptions('level'));
     $this->setExpectedException('Zend\\Filter\\Exception\\InvalidArgumentException', 'must be between');
     $filter->setLevel(15);
 }
Example #2
0
 /**
  * Setting Level
  *
  * @return void
  */
 public function testGzGetSetLevel()
 {
     $filter = new GzCompression();
     $this->assertEquals(9, $filter->getLevel());
     $filter->setLevel(6);
     $this->assertEquals(6, $filter->getOptions('level'));
     try {
         $filter->setLevel(15);
         $this->fail('Exception expected');
     } catch (\Zend\Filter\Exception $e) {
         $this->assertContains('must be between', $e->getMessage());
     }
 }