WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (4 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/IsEmail.php

    r40667 r42343  
    77    function test_returns_the_email_address_if_it_is_valid() {
    88        $data = array(
    9             "bob@example.com",
    10             "phil@example.info",
    11             "ace@204.32.222.14",
    12             "kevin@many.subdomains.make.a.happy.man.edu",
    13             "a@b.co",
    14             );
     9            'bob@example.com',
     10            'phil@example.info',
     11            'ace@204.32.222.14',
     12            'kevin@many.subdomains.make.a.happy.man.edu',
     13            'a@b.co',
     14        );
    1515        foreach ( $data as $datum ) {
    1616            $this->assertEquals( $datum, is_email( $datum ), $datum );
     
    2020    function test_returns_false_if_given_an_invalid_email_address() {
    2121        $data = array(
    22             "khaaaaaaaaaaaaaaan!",
     22            'khaaaaaaaaaaaaaaan!',
    2323            'http://bob.example.com/',
    2424            "sif i'd give u it, spamer!1",
    25             "com.exampleNOSPAMbob",
    26             "bob@your mom",
    27             "a@b.c",
    28             );
    29         foreach ($data as $datum) {
    30             $this->assertFalse(is_email($datum), $datum);
     25            'com.exampleNOSPAMbob',
     26            'bob@your mom',
     27            'a@b.c',
     28        );
     29        foreach ( $data as $datum ) {
     30            $this->assertFalse( is_email( $datum ), $datum );
    3131        }
    3232    }
Note: See TracChangeset for help on using the changeset viewer.