| 107 | /** |
| 108 | * Server Configuration where the web servers local paths do not match the FTP servers paths |
| 109 | * |
| 110 | * In this case, ftp: /home/www/example.com/ ~= web: /srv2/www/example.com/ |
| 111 | * |
| 112 | * @ticket 14401 |
| 113 | */ |
| 114 | function test_server_basepath_mismatches() { |
| 115 | global $wp_filesystem; |
| 116 | $fs = $wp_filesystem; |
| 117 | $fs->init(' |
| 118 | /home/www/example.com/subdomains/www/index.php |
| 119 | /home/www/example.com/subdomains/www/wp-includes/ |
| 120 | /home/www/example.com/subdomains/www/wp-content/plugins/ |
| 121 | '); |
| 122 | |
| 123 | $path = $fs->abspath( '/srv2/www/example.com/subdomains/www/' ); |
| 124 | $this->assertEquals( '/home/www/example.com/subdomains/www/', $path ); |
| 125 | |
| 126 | $path = $fs->find_folder( '/srv2/www/example.com/subdomains/www/wp-content/plugins/' ); |
| 127 | $this->assertEquals( '/home/www/example.com/subdomains/www/wp-content/plugins/', $path ); |
| 128 | |
| 129 | } |
| 130 | |