Tests: Skip symlinked theme file tests if symlink()
is not available, e.g. in PHP 5.2.x on Windows.
See #43508. git-svn-id: https://develop.svn.wordpress.org/trunk@42819 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1b043c1492
commit
9b713c6d12
@ -5,6 +5,9 @@
|
|||||||
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 ) {
|
||||||
|
if ( ! function_exists( 'symlink' ) ) {
|
||||||
|
self::markTestSkipped( 'symlink() is not available.' );
|
||||||
|
}
|
||||||
if ( ! @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' ) ) {
|
||||||
self::markTestSkipped( 'Could not create parent symlink.' );
|
self::markTestSkipped( 'Could not create parent symlink.' );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user