WordPress.org

Make WordPress Core

Ticket #43725: 43725.tests.diff

File 43725.tests.diff, 1.4 KB (added by danielbachhuber, 17 months ago)
  • tests/phpunit/tests/shortcode.php

    diff --git a/tests/phpunit/tests/shortcode.php b/tests/phpunit/tests/shortcode.php
    index 3577fab338..157329eae5 100644
    a b EOF; 
    347347                $this->assertEquals( strip_ws( $expected ), strip_ws( $out ) );
    348348        }
    349349
     350        /**
     351         * @ticket 43725
     352         */
     353        public function test_same_tag_multiple_formats_open_closed_one() {
     354                $in = <<<EOT
     355This post uses URL multiple times.
     356
     357[url]Now this is wrapped[/url]
     358
     359[url] This one is standalone
     360
     361[url]Now this is wrapped too[/url]
     362EOT;
     363                $expected = <<<EOT
     364This post uses URL multiple times.
     365
     366http://www.wordpress.org/
     367
     368http://www.wordpress.org/ This one is standalone
     369
     370http://www.wordpress.org/
     371EOT;
     372                $out      = do_shortcode( $in );
     373                $this->assertEquals( strip_ws( $expected ), strip_ws( $out ) );
     374        }
     375
     376        /**
     377         * @ticket 43725
     378         */
     379        public function test_same_tag_multiple_formats_open_closed_two() {
     380                $in = <<<EOT
     381This post uses URL multiple times.
     382
     383[url]Now this is wrapped[/url]
     384
     385[url/] This one is standalone
     386
     387[url]Now this is wrapped too[/url]
     388EOT;
     389                $expected = <<<EOT
     390This post uses URL multiple times.
     391
     392http://www.wordpress.org/
     393
     394http://www.wordpress.org/ This one is standalone
     395
     396http://www.wordpress.org/
     397EOT;
     398                $out      = do_shortcode( $in );
     399                $this->assertEquals( strip_ws( $expected ), strip_ws( $out ) );
     400        }
     401
    350402        /**
    351403         * @ticket 6562
    352404         */