/** * Tests Target::disableEncryption */ public function testEnableCompressionAndEncryption() { $path = '/tmp/foo/bar'; $filename = '%Y-test-%d.txt'; $target = new Target($path, $filename, strtotime('2014-12-01 04:30:57')); $target->setCompressor($this->getCompressorMockForCmd('zip', 'zip', 'application/zip')); $target->setCrypter($this->getCrypterMock('nc')); $this->assertEquals('2014-test-01.txt.zip.nc', $target->getFilename()); }