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/filesystem/findFolder.php

    r41289 r42343  
    1212        global $wp_filesystem;
    1313        $fs = $wp_filesystem;
    14         $fs->init('
     14        $fs->init(
     15            '
    1516            /var/www/wordpress/
    1617            /var/www/wordpress/wp-includes/
    1718            /var/www/wordpress/index.php
    18         ');
     19        '
     20        );
    1921
    2022        $path = $fs->find_folder( '/var/www/wordpress/' );
     
    2931        global $wp_filesystem;
    3032        $fs = $wp_filesystem;
    31         $fs->init('
     33        $fs->init(
     34            '
    3235            /www/example.com/wordpress/
    3336            /www/example.com/wordpress/wp-includes/
     
    3841            /www/wp.example.com/wordpress/index.php
    3942            /www/index.php
    40         ');
     43        '
     44        );
    4145
    4246        $path = $fs->find_folder( '/var/www/example.com/wordpress/' );
    4347        $this->assertEquals( '/www/example.com/wordpress/', $path );
    44        
     48
    4549        $path = $fs->find_folder( '/var/www/wp.example.com/wordpress/wp-content/' );
    4650        $this->assertEquals( '/www/wp.example.com/wordpress/wp-content/', $path );
     
    5761        global $wp_filesystem;
    5862        $fs = $wp_filesystem;
    59         $fs->init('
     63        $fs->init(
     64            '
    6065            /wp.example.com/index.php
    6166            /wp.example.com/wordpress/
     
    6469            /wp-includes/
    6570            /index.php
    66         ');
     71        '
     72        );
    6773
    6874        $path = $fs->abspath( '/var/www/example.com/wp.example.com/wordpress/' );
    6975        $this->assertEquals( '/wp.example.com/wordpress/', $path );
    70        
     76
    7177        $path = $fs->abspath( '/var/www/example.com/' );
    7278        $this->assertEquals( '/', $path );
     
    8288        global $wp_filesystem;
    8389        $fs = $wp_filesystem;
    84         $fs->init('
     90        $fs->init(
     91            '
    8592            # www.example.com
    8693            /example.com/www/index.php
     
    9299            /example.com/sub/wp-includes/
    93100            /example.com/sub/wp-content/plugins/
    94         ');
     101        '
     102        );
    95103
    96104        // www.example.com
Note: See TracChangeset for help on using the changeset viewer.