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