Make WordPress Core

Ticket #40856: 40856.patch

File 40856.patch, 5.8 KB (added by danielhuesken, 7 years ago)
  • tests/phpunit/tests/rest-api/rest-attachments-controller.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    5858                $role->add_cap( 'level_0' );
    5959
    6060                $orig_file = DIR_TESTDATA . '/images/canola.jpg';
    61                 $this->test_file = '/tmp/canola.jpg';
     61                $this->test_file = sys_get_temp_dir() . '/canola.jpg';
    6262                copy( $orig_file, $this->test_file );
    6363                $orig_file2 = DIR_TESTDATA . '/images/codeispoetry.png';
    64                 $this->test_file2 = '/tmp/codeispoetry.png';
     64                $this->test_file2 = sys_get_temp_dir() . '/codeispoetry.png';
    6565                copy( $orig_file2, $this->test_file2 );
    6666        }
    6767
  • tests/phpunit/tests/customize/manager.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    6060                $this->undefined = new stdClass();
    6161
    6262                $orig_file = DIR_TESTDATA . '/images/canola.jpg';
    63                 $this->test_file = '/tmp/canola.jpg';
     63                $this->test_file = sys_get_temp_dir() . '/canola.jpg';
    6464                copy( $orig_file, $this->test_file );
    6565                $orig_file2 = DIR_TESTDATA . '/images/waffles.jpg';
    66                 $this->test_file2 = '/tmp/waffles.jpg';
     66                $this->test_file2 = sys_get_temp_dir() . '/waffles.jpg';
    6767                copy( $orig_file2, $this->test_file2 );
    6868        }
    6969
  • tests/phpunit/tests/link/themeFile.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    55class Test_Theme_File extends WP_UnitTestCase {
    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               
     9                mkdir( WP_CONTENT_DIR . '/themes/theme-file-parent' );
     10                copy( DIR_TESTDATA . '/theme-file-parent/parent-and-child.php', WP_CONTENT_DIR . '/themes/theme-file-parent/parent-and-child.php' );
     11                copy( DIR_TESTDATA . '/theme-file-parent/parent-only.php', WP_CONTENT_DIR . '/themes/theme-file-parent/parent-only.php' );
     12                copy( DIR_TESTDATA . '/theme-file-parent/style.css', WP_CONTENT_DIR . '/themes/theme-file-parent/style.css' );
     13               
     14                mkdir( WP_CONTENT_DIR . '/themes/theme-file-child' );
     15                copy( DIR_TESTDATA . '/theme-file-child/parent-and-child.php', WP_CONTENT_DIR . '/themes/theme-file-child/parent-and-child.php' );
     16                copy( DIR_TESTDATA . '/theme-file-child/child-only.php', WP_CONTENT_DIR . '/themes/theme-file-child/child-only.php' );
     17                copy( DIR_TESTDATA . '/theme-file-child/style.css', WP_CONTENT_DIR . '/themes/theme-file-child/style.css' );
    1018        }
    1119
    1220        public static function wpTearDownAfterClass() {
    13                 unlink( WP_CONTENT_DIR . '/themes/theme-file-parent' );
    14                 unlink( WP_CONTENT_DIR . '/themes/theme-file-child' );
     21               
     22                unlink( WP_CONTENT_DIR . '/themes/theme-file-parent/parent-and-child.php' );
     23                unlink( WP_CONTENT_DIR . '/themes/theme-file-parent/parent-only.php' );
     24                unlink( WP_CONTENT_DIR . '/themes/theme-file-parent/style.css' );
     25                rmdir( WP_CONTENT_DIR . '/themes/theme-file-parent' );
     26                unlink( WP_CONTENT_DIR . '/themes/theme-file-child/parent-and-child.php' );
     27                unlink( WP_CONTENT_DIR . '/themes/theme-file-child/child-only.php' );
     28                unlink( WP_CONTENT_DIR . '/themes/theme-file-child/style.css' );
     29                rmdir( WP_CONTENT_DIR . '/themes/theme-file-child' );
    1530        }
    1631
    1732        /**
  • tests/phpunit/tests/file.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    88        function setUp() {
    99                parent::setUp();
    1010
    11                 $file = tempnam( '/tmp', 'foo') ;
     11                $file = tempnam( sys_get_temp_dir(), 'foo') ;
    1212                $this->dir = dirname( $file );
    1313                unlink( $file );
    1414
  • tests/phpunit/tests/widgets/media-image-widget.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    311311        function test_render_media() {
    312312                $widget = new WP_Widget_Media_Image();
    313313
    314                 $test_image = '/tmp/canola.jpg';
     314                $test_image = sys_get_temp_dir() . '/canola.jpg';
    315315                copy( DIR_TESTDATA . '/images/canola.jpg', $test_image );
    316316                $attachment_id = self::factory()->attachment->create_object( array(
    317317                        'file' => $test_image,
  • tests/phpunit/tests/widgets/media-widget.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    129129         */
    130130        function test_is_attachment_with_mime_type() {
    131131
    132                 $test_image = '/tmp/canola.jpg';
     132                $test_image = sys_get_temp_dir() . '/canola.jpg';
    133133                copy( DIR_TESTDATA . '/images/canola.jpg', $test_image );
    134134                $attachment_id = self::factory()->attachment->create_object( array(
    135135                        'file' => $test_image,