Skip to content

Commit

Permalink
Docblock cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsilverstein committed Dec 8, 2024
1 parent 8ebf6f0 commit 2d81635
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/phpunit/tests/image/editorImagick.php
Original file line number Diff line number Diff line change
Expand Up @@ -701,21 +701,21 @@ public function test_imagick_resized_image_max_bit_depth() {
$file = DIR_TESTDATA . '/images/colors_hdr_p3.avif';
$imagick_image_editor = new WP_Image_Editor_Imagick( $file );

// Skip if AVIF not supported
// Skip if AVIF not supported.
if ( ! $imagick_image_editor->supports_mime_type( 'image/avif' ) ) {
$this->markTestSkipped( 'The image editor does not support the AVIF mime type.' );
}

// Skip if depth methods not available
// Skip if depth methods not available.
if ( ! method_exists( 'Imagick', 'getImageDepth' ) || ! method_exists( 'Imagick', 'setImageDepth' ) ) {
$this->markTestSkipped( 'The image editor does not support get or setImageDepth.' );
}

// Verify source image has 10-bit depth
// Verify source image has 10-bit depth.
$imagick = new Imagick( $file );
$this->assertSame( 10, $imagick->getImageDepth() );

// Test ability to save 10-bit image
// Test ability to save 10-bit image.
$imagick->setImageDepth( 10 );
$test_file = tempnam( get_temp_dir(), '' ) . 'test10.avif';
$imagick->writeImage( $test_file );
Expand All @@ -726,7 +726,7 @@ public function test_imagick_resized_image_max_bit_depth() {
}
$im->destroy();

// Test default behavior preserves 10-bit depth
// Test default behavior preserves 10-bit depth.
$imagick_image_editor->load();
$imagick_image_editor->resize( 100, 50 );
$test_file = tempnam( get_temp_dir(), '' ) . 'test1.avif';
Expand All @@ -735,7 +735,7 @@ public function test_imagick_resized_image_max_bit_depth() {
$this->assertSame( 10, $im->getImageDepth() );
unlink( $test_file );

// Test filter can force 8-bit depth
// Test filter can set 8-bit depth
add_filter( 'imagick_resized_image_max_bit_depth', array( $this, '__return_eight' ) );
$imagick_image_editor = new WP_Image_Editor_Imagick( $file );
$imagick_image_editor->load();
Expand Down

0 comments on commit 2d81635

Please sign in to comment.