Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (8 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/HtmlExcerpt.php

    r25002 r42343  
    66class Tests_Formatting_HtmlExcerpt extends WP_UnitTestCase {
    77    function test_simple() {
    8         $this->assertEquals("Baba", wp_html_excerpt("Baba told me not to come", 4));
     8        $this->assertEquals( 'Baba', wp_html_excerpt( 'Baba told me not to come', 4 ) );
    99    }
    1010    function test_html() {
    11         $this->assertEquals("Baba", wp_html_excerpt("<a href='http://baba.net/'>Baba</a> told me not to come", 4));
     11        $this->assertEquals( 'Baba', wp_html_excerpt( "<a href='http://baba.net/'>Baba</a> told me not to come", 4 ) );
    1212    }
    1313    function test_entities() {
    14         $this->assertEquals("Baba", wp_html_excerpt("Baba &amp; Dyado", 8));
    15         $this->assertEquals("Baba", wp_html_excerpt("Baba &#038; Dyado", 8));
    16         $this->assertEquals("Baba &amp; D", wp_html_excerpt("Baba &amp; Dyado", 12));
    17         $this->assertEquals("Baba &amp; Dyado", wp_html_excerpt("Baba &amp; Dyado", 100));
     14        $this->assertEquals( 'Baba', wp_html_excerpt( 'Baba &amp; Dyado', 8 ) );
     15        $this->assertEquals( 'Baba', wp_html_excerpt( 'Baba &#038; Dyado', 8 ) );
     16        $this->assertEquals( 'Baba &amp; D', wp_html_excerpt( 'Baba &amp; Dyado', 12 ) );
     17        $this->assertEquals( 'Baba &amp; Dyado', wp_html_excerpt( 'Baba &amp; Dyado', 100 ) );
    1818    }
    1919}
Note: See TracChangeset for help on using the changeset viewer.