| 26 | | $common = DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'sfproject'.DIRECTORY_SEPARATOR; |
|---|
| 27 | | $source = $common.'web'.DIRECTORY_SEPARATOR.'myplugin'; |
|---|
| 28 | | $target = $common.'plugins'.DIRECTORY_SEPARATOR.'myplugin'.DIRECTORY_SEPARATOR.'web'; |
|---|
| 29 | | $t->is($filesystem->calculateRelativeDir($source, $target), '..'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'myplugin'.DIRECTORY_SEPARATOR.'web', '->calculateRelativeDir() correctly calculates the relative path'); |
|---|
| | 29 | $common = DS.'tmp'.DS.'sfproject'.DS; |
|---|
| | 30 | $source = $common.'web'.DS.'myplugin'; |
|---|
| | 31 | $target = $common.'plugins'.DS.'myplugin'.DS.'web'; |
|---|
| | 32 | $t->is($filesystem->calculateRelativeDir($source, $target), '..'.DS.'plugins'.DS.'myplugin'.DS.'web', '->calculateRelativeDir() correctly calculates the relative path'); |
|---|
| 31 | | $source = $common.'web'.DIRECTORY_SEPARATOR.'myplugin'; |
|---|
| 32 | | $target = $common.'web'.DIRECTORY_SEPARATOR.'otherplugin'.DIRECTORY_SEPARATOR.'sub'; |
|---|
| 33 | | $t->is($filesystem->calculateRelativeDir($source, $target), 'otherplugin'.DIRECTORY_SEPARATOR.'sub', '->calculateRelativeDir() works without going up one dir'); |
|---|
| | 34 | $source = $common.'web'.DS.'myplugin'; |
|---|
| | 35 | $target = $common.'webplugins'.DS.'myplugin'.DS.'web'; |
|---|
| | 36 | $t->is($filesystem->calculateRelativeDir($source, $target), '..'.DS.'webplugins'.DS.'myplugin'.DS.'web', '->calculateRelativeDir() correctly calculates the relative path for dirs that share chars'); |
|---|
| | 37 | |
|---|
| | 38 | $source = $common.'web'.DS.'myplugin'; |
|---|
| | 39 | $target = $common.'web'.DS.'otherplugin'.DS.'sub'; |
|---|
| | 40 | $t->is($filesystem->calculateRelativeDir($source, $target), 'otherplugin'.DS.'sub', '->calculateRelativeDir() works without going up one dir'); |
|---|
| | 45 | |
|---|
| | 46 | $source = $common.'web'.DS.'myplugin'; |
|---|
| | 47 | $target = $common.'web'.DS.'myotherplugin'.DS.'sub'; |
|---|
| | 48 | $t->is($filesystem->calculateRelativeDir($source, $target), 'myotherplugin'.DS.'sub', '->calculateRelativeDir() correctly calculates the relative path for dirs that share chars'); |
|---|
| | 49 | |
|---|
| | 50 | $source = $common.'web'.DS.'myplugin'; |
|---|
| | 51 | $target = $common.'web'.DS.'motherplugin'.DS.'sub'; |
|---|
| | 52 | $t->is($filesystem->calculateRelativeDir($source, $target), 'motherplugin'.DS.'sub', '->calculateRelativeDir() correctly calculates the relative path for dirs that share chars'); |
|---|