WordPress.org

Make WordPress Core

Ticket #32729: 34182-2.diff

File 34182-2.diff, 960 bytes (added by jgrodel, 5 years ago)
  • tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php

    diff --git tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php tests/phpunit/tests/formatting/SanitizeTitleWithDashes.php
    index 80be941..2346893 100644
    class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase { 
    114114                $this->assertEquals("aaaa", sanitize_title_with_dashes("ááa´aˊ", '', 'save'));
    115115        }
    116116
     117        /**
     118         * @ticket 32729
     119         */
     120        function test_removes_pluses() {
     121                $this->assertEquals("12", sanitize_title_with_dashes("1+2"));
     122                $this->assertEquals("math-is-hard-34", sanitize_title_with_dashes("math is hard 3+4+"));
     123        }
     124
     125        /**
     126         * @ticket 32729
     127         */
     128        function test_removes_equal_signs() {
     129                $this->assertEquals("56", sanitize_title_with_dashes("5=6", '', 'save'));
     130                $this->assertEquals("math-is-hard-77", sanitize_title_with_dashes("math is hard 7=7", '', 'save'));
     131        }
    117132}