Make WordPress Core

Changeset 42812


Ignore:
Timestamp:
03/09/2018 01:09:17 AM (9 years ago)
Author:
SergeyBiryukov
Message:

Tests: Skip symlinked theme file tests if the links could not be created.

Fixes #43508.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/link/themeFile.php

    r42343 r42812  
    66
    77        public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
    8                 symlink( DIR_TESTDATA . '/theme-file-parent', WP_CONTENT_DIR . '/themes/theme-file-parent' );
    9                 symlink( DIR_TESTDATA . '/theme-file-child', WP_CONTENT_DIR . '/themes/theme-file-child' );
     8                if ( ! @symlink( DIR_TESTDATA . '/theme-file-parent', WP_CONTENT_DIR . '/themes/theme-file-parent' ) ) {
     9                        self::markTestSkipped( 'Could not create parent symlink.' );
     10                }
     11                if ( ! @symlink( DIR_TESTDATA . '/theme-file-child', WP_CONTENT_DIR . '/themes/theme-file-child' ) ) {
     12                        self::markTestSkipped( 'Could not create child symlink.' );
     13                }
    1014        }
    1115
Note: See TracChangeset for help on using the changeset viewer.