Make WordPress Core

Ticket #23845: 23845.diff

File 23845.diff, 1.1 KB (added by dd32, 11 years ago)
  • media/sf_www/wordpress-develop/tests/phpunit/tests/filesystem/find_folder.php

     
    104104                $this->assertEquals( '/example.com/sub/wp-content/plugins/', $path );
    105105        }
    106106
     107        /**
     108         * Server Configuration where the local path contains no token that exists in the FTP path
     109         *
     110         * In this case, ftp: /example.com/ ~= web: /home/domain/12345/
     111         *
     112         * @ticket 23845
     113         */
     114        function test_server_basepath_mismatches2() {
     115                global $wp_filesystem;
     116                $fs = $wp_filesystem;
     117                $fs->init('
     118                        /example.com/index.php
     119                        /example.com/wp-includes/
     120                        /example.com/wp-content/plugins/
     121                ');
     122
     123                $path = $fs->abspath( '/home/domain/12345/' );
     124                $this->assertEquals( '/example.com/', $path );
     125
     126                $path = $fs->find_folder( '/home/domain/12345/wp-content/plugins/' );
     127                $this->assertEquals( '/example.com/wp-content/plugins/', $path );
     128        }
     129
    107130}
     131 No newline at end of file