Changeset 40392 for trunk/tests/phpunit/tests/image/editor.php
- Timestamp:
- 04/07/2017 01:37:39 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/image/editor.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/editor.php
r36616 r40392 47 47 48 48 /** 49 * Return integer of 95 for testing. 50 */ 51 public function return_integer_95() { 52 return 95; 53 } 54 55 /** 56 * Return integer of 100 for testing. 57 */ 58 public function return_integer_100() { 59 return 100; 60 } 61 62 /** 49 63 * Test test_quality 50 64 * @ticket 6821 … … 60 74 61 75 // Ensure the quality filters do not have precedence if created after editor instantiation. 62 $func_100_percent = create_function( '', "return 100;");76 $func_100_percent = array( $this, 'return_integer_100' ); 63 77 add_filter( 'wp_editor_set_quality', $func_100_percent ); 64 78 $this->assertEquals( 82, $editor->get_quality() ); 65 79 66 $func_95_percent = create_function( '', "return 95;");80 $func_95_percent = array( $this, 'return_integer_95' ); 67 81 add_filter( 'jpeg_quality', $func_95_percent ); 68 82 $this->assertEquals( 82, $editor->get_quality() );
Note: See TracChangeset
for help on using the changeset viewer.