Skip to content

Commit e66a96f

Browse files
author
David Alger
committed
Corrected testSourceAndTargetAreDirsDoExist for issue 76
1 parent f86d996 commit e66a96f

File tree

2 files changed

+3
-3
lines changed
  • src/MagentoHackathon/Composer/Magento/Deploystrategy
  • tests/MagentoHackathon/Composer/Magento/Deploystrategy

2 files changed

+3
-3
lines changed

src/MagentoHackathon/Composer/Magento/Deploystrategy/Copy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public function createDelegate($source, $dest)
4141
// Namespace/ModuleDir => Namespace/, but Namespace/ModuleDir may exist
4242
// Namespace/ModuleDir => Namespace/ModuleDir, but ModuleDir may exist
4343

44-
// first iteration through, we need to handle Namespace/ModuleDir => Namespace/ type glob
45-
if ($mapSource == $source && $mapDest == $this->removeTrailingSlash($dest)) {
44+
// first iteration through, we need to update the mappings to correctly handle mismatch globs
45+
if ($mapSource == $this->removeTrailingSlash($source) && $mapDest == $this->removeTrailingSlash($dest)) {
4646
if (basename($sourcePath) !== basename($destPath)) {
4747
$this->setCurrentMapping(array($mapSource, $mapDest . '/' . basename($source)));
4848
$cleanDest = $cleanDest . '/' . basename($source);

tests/MagentoHackathon/Composer/Magento/Deploystrategy/AbstractTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public function testSourceAndTargetAreDirsDoExist()
389389
$this->mkdir($this->destDir . DS . $dest);
390390

391391
// The target should be created INSIDE the target directory because the target dir exists exist
392-
// This is how bash commands (and therefore modman) process source and targer
392+
// This is how bash commands (and therefore modman) process source and target
393393

394394
$testTarget = $this->destDir . DS . $dest . DS . basename($globSource);
395395
$testTargetContent = $testTarget . DS . $sourceDirContent;

0 commit comments

Comments
 (0)