public function ImageUtilityTest::testResizeDimensions in Image Effects 8
Same name and namespace in other branches
- 8.3 tests/src/Unit/ImageUtilityTest.php \Drupal\Tests\image_effects\Unit\ImageUtilityTest::testResizeDimensions()
- 8.2 tests/src/Unit/ImageUtilityTest.php \Drupal\Tests\image_effects\Unit\ImageUtilityTest::testResizeDimensions()
@covers ::resizeDimensions @dataProvider resizeDimensionsProvider
File
- tests/
src/ Unit/ ImageUtilityTest.php, line 80
Class
- ImageUtilityTest
- Tests the image utility helper methods.
Namespace
Drupal\Tests\image_effects\UnitCode
public function testResizeDimensions($source_width, $source_height, $width_specification, $height_specification, $square, $expected_width, $expected_height) {
$result = ImageUtility::resizeDimensions($source_width, $source_height, $width_specification, $height_specification, $square);
$this
->assertSame($expected_width, $result['width']);
$this
->assertSame($expected_height, $result['height']);
}