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:
Sergey Biryukov 2018-03-09 17:47:39 +00:00
parent 1b043c1492
commit 9b713c6d12

View File

@ -5,6 +5,9 @@
class Test_Theme_File extends WP_UnitTestCase {
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' ) ) {
self::markTestSkipped( 'Could not create parent symlink.' );
}