File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
tests/MagentoHackathon/Composer/Magento/Deploystrategy Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -95,4 +95,25 @@ public function testTargetDirWithChildDirExistsForce()
95
95
$ this ->assertFileType ($ testTarget , self ::TEST_FILETYPE_FILE );
96
96
$ this ->assertFileType (dirname ($ testTarget ), self ::TEST_FILETYPE_LINK );
97
97
}
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
+ }
98
119
}
You can’t perform that action at this time.
0 commit comments