Media: Update unit tests after change to default image quality.

Updates unit tests to reflect new default quality setting of '82' after [36615].

See #33642.

git-svn-id: https://develop.svn.wordpress.org/trunk@36616 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mike Schroder 2016-02-22 23:13:27 +00:00
parent c270654d2c
commit cde3d4c399
1 changed files with 3 additions and 3 deletions

View File

@ -56,16 +56,16 @@ class Tests_Image_Editor extends WP_Image_UnitTestCase {
$editor->set_mime_type( "image/jpeg" ); // Ensure mime-specific filters act properly.
// Check default value
$this->assertEquals( 90, $editor->get_quality() );
$this->assertEquals( 82, $editor->get_quality() );
// Ensure the quality filters do not have precedence if created after editor instantiation.
$func_100_percent = create_function( '', "return 100;" );
add_filter( 'wp_editor_set_quality', $func_100_percent );
$this->assertEquals( 90, $editor->get_quality() );
$this->assertEquals( 82, $editor->get_quality() );
$func_95_percent = create_function( '', "return 95;" );
add_filter( 'jpeg_quality', $func_95_percent );
$this->assertEquals( 90, $editor->get_quality() );
$this->assertEquals( 82, $editor->get_quality() );
// Ensure set_quality() works and overrides the filters
$this->assertTrue( $editor->set_quality( 75 ) );