/** * Tests the JImage::sanitizeWidth method. * * @param mixed $inputHeight The height input. * @param mixed $inputWidth The width input. * @param integer $imageHeight The original image height. * @param integer $imageWidth The original image width. * @param integer $expectedHeight The expected result image height. * @param integer $expectedWidth The expected result image width. * * @return void * * @dataProvider getSanitizeDimensionData * @since 11.3 */ public function testSanitizeWidth($inputHeight, $inputWidth, $imageHeight, $imageWidth, $expectedHeight, $expectedWidth) { // Create a image handle of the correct size. $imageHandle = imagecreatetruecolor($imageWidth, $imageHeight); // Create a new JImageInspector from the image handle. $image = new JImageInspector($imageHandle); // Validate the correct response. $this->assertEquals($expectedWidth, $image->sanitizeWidth($inputWidth, $inputHeight)); }