Changeset 52010 for trunk/tests/phpunit/tests/formatting/wpRicheditPre.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/wpRicheditPre.php
r51623 r52010 7 7 class Tests_Formatting_wpRicheditPre extends WP_UnitTestCase { 8 8 9 function _charset_iso_8859_1() {9 public function charset_iso_8859_1() { 10 10 return 'iso-8859-1'; 11 11 } … … 15 15 * @ticket 23688 16 16 */ 17 function test_wp_richedit_pre_charset_iso_8859_1() {18 add_filter( 'pre_option_blog_charset', array( $this, ' _charset_iso_8859_1' ) );17 public function test_wp_richedit_pre_charset_iso_8859_1() { 18 add_filter( 'pre_option_blog_charset', array( $this, 'charset_iso_8859_1' ) ); 19 19 $iso8859_1 = 'Fran' . chr( 135 ) . 'ais'; 20 20 $this->assertSame( '<p>' . $iso8859_1 . "</p>\n", wp_richedit_pre( $iso8859_1 ) ); 21 remove_filter( 'pre_option_blog_charset', array( $this, ' _charset_iso_8859_1' ) );21 remove_filter( 'pre_option_blog_charset', array( $this, 'charset_iso_8859_1' ) ); 22 22 } 23 23 24 function _charset_utf_8() {24 public function charset_utf_8() { 25 25 return 'UTF-8'; 26 26 } … … 29 29 * @ticket 23688 30 30 */ 31 function test_wp_richedit_pre_charset_utf_8() {32 add_filter( 'pre_option_blog_charset', array( $this, ' _charset_utf_8' ) );31 public function test_wp_richedit_pre_charset_utf_8() { 32 add_filter( 'pre_option_blog_charset', array( $this, 'charset_utf_8' ) ); 33 33 $utf8 = 'Fran' . chr( 195 ) . chr( 167 ) . 'ais'; 34 34 $this->assertSame( '<p>' . $utf8 . "</p>\n", wp_richedit_pre( $utf8 ) ); 35 remove_filter( 'pre_option_blog_charset', array( $this, ' _charset_utf_8' ) );35 remove_filter( 'pre_option_blog_charset', array( $this, 'charset_utf_8' ) ); 36 36 } 37 37 }
Note: See TracChangeset
for help on using the changeset viewer.