Make WordPress Core

Ticket #12690: 12690.unit-test.patch

File 12690.unit-test.patch, 781 bytes (added by kurtpayne, 11 years ago)
  • tests/formatting/WPTexturize.php

     
    172172                $this->assertEquals(' “Testing”', wptexturize(' "Testing"'));
    173173                $this->assertEquals('&“Testing”', wptexturize('&"Testing"'));
    174174        }
     175       
     176        /**
     177         * @ticket 12690
     178         */
     179        public function test_brackets_in_urls() {
     180                $original = '[ photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy </a> ]';
     181                $expected = '[ photos by <a href="http://example.com/?a[]=1&#038;a[]=2"> this guy </a> ]';
     182                $texturized = wptexturize( $original );
     183                $this->assertEquals( $expected, $texturized );
     184        }
    175185}