Skip to content

Commit 2e801e8

Browse files
committed
add regression test for Issue #121
1 parent b70dbe9 commit 2e801e8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,25 @@ public function testTargetDirWithChildDirExistsForce()
9595
$this->assertFileType($testTarget, self::TEST_FILETYPE_FILE);
9696
$this->assertFileType(dirname($testTarget), self::TEST_FILETYPE_LINK);
9797
}
98+
99+
/**
100+
* @see https://github.com/magento-hackathon/magento-composer-installer/issues/121
101+
*/
102+
public function testEmptyDirectoryCleanup()
103+
{
104+
$directory = '/app/code/Jay/Ext1';
105+
$file = $directory . '/file.txt';
106+
$this->mkdir($this->sourceDir . $directory);
107+
touch($this->sourceDir . $file);
108+
$this->strategy->setMappings(array(array($file, $file)));
109+
110+
$this->strategy->deploy();
111+
112+
$this->assertFileExists($this->destDir . $file);
113+
114+
$this->strategy->clean();
115+
116+
$this->assertFileNotExists($this->destDir . $file);
117+
$this->assertFileNotExists($this->destDir . $directory);
118+
}
98119
}

0 commit comments

Comments
 (0)