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

Fixes #43508.

git-svn-id: https://develop.svn.wordpress.org/trunk@42812 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-03-09 01:09:17 +00:00
parent 4fef5ff721
commit 94e44cd9ed
1 changed files with 6 additions and 2 deletions

View File

@ -5,8 +5,12 @@
class Test_Theme_File extends WP_UnitTestCase {
public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
symlink( DIR_TESTDATA . '/theme-file-parent', WP_CONTENT_DIR . '/themes/theme-file-parent' );
symlink( DIR_TESTDATA . '/theme-file-child', WP_CONTENT_DIR . '/themes/theme-file-child' );
if ( ! @symlink( DIR_TESTDATA . '/theme-file-parent', WP_CONTENT_DIR . '/themes/theme-file-parent' ) ) {
self::markTestSkipped( 'Could not create parent symlink.' );
}
if ( ! @symlink( DIR_TESTDATA . '/theme-file-child', WP_CONTENT_DIR . '/themes/theme-file-child' ) ) {
self::markTestSkipped( 'Could not create child symlink.' );
}
}
public static function wpTearDownAfterClass() {