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


git-svn-id: https://develop.svn.wordpress.org/trunk@41635 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2017-09-28 22:55:54 +00:00
parent c8ff7f6592
commit 4277df991d
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ class Tests_Pluggable extends WP_UnitTestCase {
}
foreach ( $test_files as $file ) {
preg_match_all( '#^function (\w+)#m', file_get_contents( ABSPATH . '/' . $file ), $functions );
preg_match_all( '#^\t?function (\w+)#m', file_get_contents( ABSPATH . '/' . $file ), $functions );
foreach ( $functions[1] as $function ) {
$data[] = array(

View File

@ -401,7 +401,7 @@ class Tests_User_Capabilities extends WP_UnitTestCase {
$this->assertSame( 1, $matched );
$this->assertNotEmpty( $function );
$matched = preg_match_all( '/^[\t]case \'([^\']+)/m', $function[0], $cases );
$matched = preg_match_all( '/^[\t]{1,2}case \'([^\']+)/m', $function[0], $cases );
$this->assertNotEmpty( $matched );
$this->assertNotEmpty( $cases );