Changeset 54889 for trunk/tests/phpunit/tests/kses.php
- Timestamp:
- 11/29/2022 12:32:37 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/kses.php
r54675 r54889 1648 1648 * @param string $expected The expected result from KSES. 1649 1649 */ 1650 function test_wp_kses_object_tag_allowed( $html, $expected ) {1650 public function test_wp_kses_object_tag_allowed( $html, $expected ) { 1651 1651 $this->assertSame( $expected, wp_kses_post( $html ) ); 1652 1652 } … … 1655 1655 * Data provider for test_wp_kses_object_tag_allowed(). 1656 1656 */ 1657 function data_wp_kses_object_tag_allowed() {1657 public function data_wp_kses_object_tag_allowed() { 1658 1658 return array( 1659 1659 'valid value for type' => array( … … 1758 1758 * @param string $expected The expected result from KSES. 1759 1759 */ 1760 function test_wp_kses_object_data_url_with_port_number_allowed( $html, $expected ) {1760 public function test_wp_kses_object_data_url_with_port_number_allowed( $html, $expected ) { 1761 1761 add_filter( 'upload_dir', array( $this, 'wp_kses_upload_dir_filter' ), 10, 2 ); 1762 1762 $this->assertSame( $expected, wp_kses_post( $html ) ); … … 1766 1766 * Data provider for test_wp_kses_object_data_url_with_port_number_allowed(). 1767 1767 */ 1768 function data_wp_kses_object_data_url_with_port_number_allowed() {1768 public function data_wp_kses_object_data_url_with_port_number_allowed() { 1769 1769 return array( 1770 1770 'url with port number' => array( … … 1805 1805 * @ticket 54261 1806 1806 */ 1807 function test_wp_kses_object_added_in_html_filter() {1807 public function test_wp_kses_object_added_in_html_filter() { 1808 1808 $html = <<<HTML 1809 1809 <object type="application/pdf" data="https://wordpress.org/foo.pdf" /> … … 1822 1822 } 1823 1823 1824 function filter_wp_kses_object_added_in_html_filter( $tags, $context ) {1824 public function filter_wp_kses_object_added_in_html_filter( $tags, $context ) { 1825 1825 if ( 'post' === $context ) { 1826 1826 $tags['object'] = array( … … 1849 1849 * @param array $allowed_html The allowed HTML to pass to KSES. 1850 1850 */ 1851 function test_wp_kses_allowed_values_list( $html, $expected, $allowed_html ) {1851 public function test_wp_kses_allowed_values_list( $html, $expected, $allowed_html ) { 1852 1852 $this->assertSame( $expected, wp_kses( $html, $allowed_html ) ); 1853 1853 } … … 1856 1856 * Data provider for test_wp_kses_allowed_values_list(). 1857 1857 */ 1858 function data_wp_kses_allowed_values_list() {1858 public function data_wp_kses_allowed_values_list() { 1859 1859 $data = array( 1860 1860 'valid dir attribute value' => array( … … 1907 1907 * @param array $allowed_html The allowed HTML to pass to KSES. 1908 1908 */ 1909 function test_wp_kses_required_attribute( $html, $expected, $allowed_html ) {1909 public function test_wp_kses_required_attribute( $html, $expected, $allowed_html ) { 1910 1910 $this->assertSame( $expected, wp_kses( $html, $allowed_html ) ); 1911 1911 } … … 1914 1914 * Data provider for test_wp_kses_required_attribute(). 1915 1915 */ 1916 function data_wp_kses_required_attribute() {1916 public function data_wp_kses_required_attribute() { 1917 1917 $data = array( 1918 1918 'valid dir attribute value' => array(
Note: See TracChangeset
for help on using the changeset viewer.