| 40 | |
| 41 | function test_lone_ampersand() { |
| 42 | $actual = esc_html( 'A & B' ); |
| 43 | $expected = "A & B"; |
| 44 | $this->assertEquals( $expected, $actual ); |
| 45 | } |
| 46 | |
| 47 | function test_lone_esc_ampersand() { |
| 48 | $actual = esc_html( 'A & B' ); |
| 49 | $expected = "A & B"; |
| 50 | $this->assertEquals( $expected, $actual ); |
| 51 | } |
| 52 | |
| 53 | function test_lone_ndash() { |
| 54 | $actual = esc_html( 'A – B' ); |
| 55 | $expected = "A – B"; |
| 56 | $this->assertEquals( $expected, $actual ); |
| 57 | } |
| 58 | |
| 59 | function test_ampersand_and_ndash() { |
| 60 | $actual = esc_html( 'A – B' ); |
| 61 | $expected = "A – B"; |
| 62 | $this->assertEquals( $expected, $actual ); |
| 63 | } |
| 64 | |
| 65 | function test_ampersand_and_ndash_missing_semicolon() { |
| 66 | $actual = esc_html( 'A &ndash B' ); |
| 67 | $expected = "A &ndash B"; |
| 68 | $this->assertEquals( $expected, $actual ); |
| 69 | } |
| 70 | |