public function testExample02_FitImageIntoABox()
 {
     $inputPath = TESTING_ASSETS_DIR . '/rick.jpg';
     $outputDirectory = TESTING_TMP_DIR;
     $filter = new Polycast_Filter_ImageSize();
     $config = $filter->getConfig();
     $config->setWidth(100)->setHeight(100)->setQuality(50)->setStrategy(new Polycast_Filter_ImageSize_Strategy_Fit())->setOverwriteMode(Polycast_Filter_ImageSize::OVERWRITE_ALL)->getOutputImageType('png');
     $filter->setOutputPathBuilder(new Polycast_Filter_ImageSize_PathBuilder_Standard($outputDirectory));
     // in some cases you might want to know the path of the file before it
     // is acutally written. then use this:
     $predictedOutputPath = $filter->getOutputPath($inputPath);
     $actualOutputPath = $filter->filter($inputPath);
     $this->assertEquals($predictedOutputPath, $actualOutputPath);
     $this->assertFileExists($actualOutputPath);
     $this->assertImageFitsInBox(100, 100, $actualOutputPath);
 }