| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * @group plugin |
| 5 | */ |
| 6 | class Tests_Plugin extends WP_UnitTestCase { |
| 7 | |
| 8 | protected $wp_plugin_paths_backup; |
| 9 | |
| 10 | public function setUp() { |
| 11 | parent::setUp(); |
| 12 | |
| 13 | $this->wp_plugin_paths_backup = $GLOBALS['wp_plugin_paths']; |
| 14 | } |
| 15 | |
| 16 | public function tearDown() { |
| 17 | $GLOBALS['wp_plugin_paths'] = $this->wp_plugin_paths_backup; |
| 18 | |
| 19 | parent::tearDown(); |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * @ticket 28441 |
| 24 | */ |
| 25 | public function test_symlink_path_conflicts_resolved() { |
| 26 | |
| 27 | global $wp_plugin_paths; |
| 28 | |
| 29 | $wp_plugin_paths[ WP_PLUGIN_DIR . '/shopp' ] = '/Users/me/Dropbox/Development/Repositories/shopp'; |
| 30 | $wp_plugin_paths[ WP_PLUGIN_DIR . '/trunk'] = '/Users/me/Dropbox/Development/Repositories/shopp-arrange/trunk'; |
| 31 | |
| 32 | $this->assertEquals( |
| 33 | 'trunk/shopp-arrange.php' |
| 34 | , plugin_basename( '/Users/me/Dropbox/Development/Repositories/shopp-arrange/trunk/shopp-arrange.php' ) |
| 35 | ); |
| 36 | } |
| 37 | } |