| | 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 | |