WordPress.org

Make WordPress Core

Changeset 41635


Ignore:
Timestamp:
09/28/2017 10:55:54 PM (2 years ago)
Author:
johnbillion
Message:

Build/Test tools: Update some test cases in anticipation of code formatting corrections.

These two tests assume a certain level of indentation in code which does not conform to core's coding
standards and will hopefully be corrected at some point in #41057.

See #41057

Location:
trunk/tests/phpunit/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/pluggable.php

    r36311 r41635  
    103103
    104104        foreach ( $test_files as $file ) {
    105             preg_match_all( '#^function (\w+)#m', file_get_contents( ABSPATH . '/' . $file ), $functions );
     105            preg_match_all( '#^\t?function (\w+)#m', file_get_contents( ABSPATH . '/' . $file ), $functions );
    106106
    107107            foreach ( $functions[1] as $function ) {
  • trunk/tests/phpunit/tests/user/capabilities.php

    r41625 r41635  
    402402        $this->assertNotEmpty( $function );
    403403
    404         $matched = preg_match_all( '/^[\t]case \'([^\']+)/m', $function[0], $cases );
     404        $matched = preg_match_all( '/^[\t]{1,2}case \'([^\']+)/m', $function[0], $cases );
    405405        $this->assertNotEmpty( $matched );
    406406        $this->assertNotEmpty( $cases );
Note: See TracChangeset for help on using the changeset viewer.