Make WordPress Core

Ticket #29557: 29557-unittests.diff

File 29557-unittests.diff, 887 bytes (added by MikeHansenMe, 10 years ago)

see #30284

  • tests/phpunit/tests/formatting/WPTexturize.php

    diff --git a/tests/phpunit/tests/formatting/WPTexturize.php b/tests/phpunit/tests/formatting/WPTexturize.php
    index 16233f5..1bc197b 100644
    a b class Tests_Formatting_WPTexturize extends WP_UnitTestCase { 
    17381738                        ),
    17391739                );
    17401740        }
     1741
     1742        /**
     1743         * Test disabling shortcode texturization.
     1744         *
     1745         * @ticket 29557
     1746         * @dataProvider data_unregistered_shortcodes
     1747         */
     1748        function test_unregistered_shortcodes( $input, $output ) {
     1749                add_filter( 'no_texturize_shortcodes', array( $this, 'filter_shortcodes' ), 10, 1 );
     1750       
     1751                $output = $this->assertEquals( $output, wptexturize( $input ) );
     1752       
     1753                remove_filter( 'no_texturize_shortcodes', array( $this, 'filter_shortcodes' ), 10, 1 );
     1754                return $output;
     1755        }
    17411756       
    17421757        function filter_shortcodes( $disabled ) {
    17431758                $disabled[] = 'audio';