| 1826 | | } |
| 1827 | | No newline at end of file |
| | 1826 | |
| | 1827 | /** |
| | 1828 | * Test nested quotations. |
| | 1829 | * |
| | 1830 | * @ticket 29882 |
| | 1831 | * @dataProvider test_nested_quotations_data |
| | 1832 | */ |
| | 1833 | function test_nested_quotations( $input, $output ) { |
| | 1834 | return $this->assertEquals( $output, wptexturize( $input ) ); |
| | 1835 | } |
| | 1836 | |
| | 1837 | function test_nested_quotations_data() { |
| | 1838 | $so = '‘'; |
| | 1839 | $sc = $apos = '’'; |
| | 1840 | $do = '“'; |
| | 1841 | $dc = '”'; |
| | 1842 | |
| | 1843 | return array( |
| | 1844 | array( "She said, \"'I'm tired,' he mumbled.\"", "She said, {$do}{$so}I{$apos}m tired,{$sc} he mumbled.{$dc}" ), |
| | 1845 | array( "She said, \"He mumbled, 'I'm tired.'\"", "She said, {$do}He mumbled, {$so}I{$apos}m tired.{$sc}{$dc}" ), |
| | 1846 | array( "He said, '\"I'm tired,\" she mumbled.'", "He said, {$so}{$do}I{$apos}m tired,{$dc} she mumbled.{$sc}" ), |
| | 1847 | array( "He said, 'She mumbled, \"I'm tired.\"'", "He said, {$so}She mumbled, {$do}I{$apos}m tired.{$dc}{$sc}" ) |
| | 1848 | ); |
| | 1849 | } |
| | 1850 | } |