- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/canonicalCharset.php
r47780 r48937 10 10 11 11 public function test_utf_8_lower() { 12 $this->assert Equals( 'UTF-8', _canonical_charset( 'utf-8' ) );12 $this->assertSame( 'UTF-8', _canonical_charset( 'utf-8' ) ); 13 13 } 14 14 15 15 public function test_utf_8_upper() { 16 $this->assert Equals( 'UTF-8', _canonical_charset( 'UTF-8' ) );16 $this->assertSame( 'UTF-8', _canonical_charset( 'UTF-8' ) ); 17 17 } 18 18 19 19 public function test_utf_8_mixxed() { 20 $this->assert Equals( 'UTF-8', _canonical_charset( 'Utf-8' ) );20 $this->assertSame( 'UTF-8', _canonical_charset( 'Utf-8' ) ); 21 21 } 22 22 23 23 public function test_utf_8() { 24 $this->assert Equals( 'UTF-8', _canonical_charset( 'UTF8' ) );24 $this->assertSame( 'UTF-8', _canonical_charset( 'UTF8' ) ); 25 25 } 26 26 27 27 public function test_iso_lower() { 28 $this->assert Equals( 'ISO-8859-1', _canonical_charset( 'iso-8859-1' ) );28 $this->assertSame( 'ISO-8859-1', _canonical_charset( 'iso-8859-1' ) ); 29 29 } 30 30 31 31 public function test_iso_upper() { 32 $this->assert Equals( 'ISO-8859-1', _canonical_charset( 'ISO-8859-1' ) );32 $this->assertSame( 'ISO-8859-1', _canonical_charset( 'ISO-8859-1' ) ); 33 33 } 34 34 35 35 public function test_iso_mixxed() { 36 $this->assert Equals( 'ISO-8859-1', _canonical_charset( 'Iso8859-1' ) );36 $this->assertSame( 'ISO-8859-1', _canonical_charset( 'Iso8859-1' ) ); 37 37 } 38 38 39 39 public function test_iso() { 40 $this->assert Equals( 'ISO-8859-1', _canonical_charset( 'ISO8859-1' ) );40 $this->assertSame( 'ISO-8859-1', _canonical_charset( 'ISO8859-1' ) ); 41 41 } 42 42 43 43 public function test_random() { 44 $this->assert Equals( 'random', _canonical_charset( 'random' ) );44 $this->assertSame( 'random', _canonical_charset( 'random' ) ); 45 45 } 46 46 47 47 public function test_empty() { 48 $this->assert Equals( '', _canonical_charset( '' ) );48 $this->assertSame( '', _canonical_charset( '' ) ); 49 49 } 50 50 … … 56 56 57 57 update_option( 'blog_charset', 'utf8' ); 58 $this->assert Equals( 'UTF-8', get_option( 'blog_charset' ) );58 $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); 59 59 60 60 update_option( 'blog_charset', 'utf-8' ); 61 $this->assert Equals( 'UTF-8', get_option( 'blog_charset' ) );61 $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); 62 62 63 63 update_option( 'blog_charset', 'UTF8' ); 64 $this->assert Equals( 'UTF-8', get_option( 'blog_charset' ) );64 $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); 65 65 66 66 update_option( 'blog_charset', 'UTF-8' ); 67 $this->assert Equals( 'UTF-8', get_option( 'blog_charset' ) );67 $this->assertSame( 'UTF-8', get_option( 'blog_charset' ) ); 68 68 69 69 update_option( 'blog_charset', 'ISO-8859-1' ); 70 $this->assert Equals( 'ISO-8859-1', get_option( 'blog_charset' ) );70 $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); 71 71 72 72 update_option( 'blog_charset', 'ISO8859-1' ); 73 $this->assert Equals( 'ISO-8859-1', get_option( 'blog_charset' ) );73 $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); 74 74 75 75 update_option( 'blog_charset', 'iso8859-1' ); 76 $this->assert Equals( 'ISO-8859-1', get_option( 'blog_charset' ) );76 $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); 77 77 78 78 update_option( 'blog_charset', 'iso-8859-1' ); 79 $this->assert Equals( 'ISO-8859-1', get_option( 'blog_charset' ) );79 $this->assertSame( 'ISO-8859-1', get_option( 'blog_charset' ) ); 80 80 81 81 // Arbitrary strings are passed through. 82 82 update_option( 'blog_charset', 'foobarbaz' ); 83 $this->assert Equals( 'foobarbaz', get_option( 'blog_charset' ) );83 $this->assertSame( 'foobarbaz', get_option( 'blog_charset' ) ); 84 84 85 85 update_option( 'blog_charset', $orig_blog_charset );
Note: See TracChangeset
for help on using the changeset viewer.