14 $y = round( $expected * $height / $width );
16 $y2 = round( $result * $height / $width );
17 $this->assertEquals( $expected,
19 "($width, $height, $max) wanted: {$expected}x$y, got: {z$result}x$y2" );
24 static::generateTestFitBoxWidthData( 50, 50, [
29 static::generateTestFitBoxWidthData( 366, 300, [
34 static::generateTestFitBoxWidthData( 300, 366, [
39 static::generateTestFitBoxWidthData( 100, 400, [
63 foreach ( $tests as $max => $expected ) {
64 $result[] = [ $width, $height, $max, $expected ];
namespace being checked & $result