Exemple #1
0
 /**
  *
  */
 public function testGetInvalidCompressionAlgorithm()
 {
     $manager = new CompressionManager();
     $manager->addCompressionAlgorithm(new Deflate())->addCompressionAlgorithm(new GZip())->addCompressionAlgorithm(new ZLib());
     $compression = $manager->getCompressionAlgorithm('FOO');
     $this->assertNull($compression);
 }
Exemple #2
0
 /**
  * @return \SpomkyLabs\Jose\Compression\CompressionManager
  */
 protected function getCompressionManager()
 {
     $compression_manager = new CompressionManager();
     $compression_manager->addCompressionAlgorithm(new Deflate())->addCompressionAlgorithm(new GZip())->addCompressionAlgorithm(new ZLib());
     return $compression_manager;
 }