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:
parent
4fef5ff721
commit
94e44cd9ed
@ -5,8 +5,12 @@
|
|||||||
class Test_Theme_File extends WP_UnitTestCase {
|
class Test_Theme_File extends WP_UnitTestCase {
|
||||||
|
|
||||||
public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
|
public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) {
|
||||||
symlink( DIR_TESTDATA . '/theme-file-parent', WP_CONTENT_DIR . '/themes/theme-file-parent' );
|
if ( ! @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' );
|
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() {
|
public static function wpTearDownAfterClass() {
|
||||||
|
Loading…
Reference in New Issue
Block a user