3 class ImageFunctionsTest
extends PHPUnit_Framework_TestCase
{
4 function testFitBoxWidth() {
34 foreach( $vals as $row ) {
36 foreach( $tests as $max => $expected ) {
37 $y = round( $expected * $height / $width );
38 $result = wfFitBoxWidth( $width, $height, $max );
39 $y2 = round( $result * $height / $width );
40 $this->assertEquals( $expected,
42 "($width, $height, $max) wanted: {$expected}x$y, got: {$result}x$y2" );