@@ -146,6 +146,7 @@ public function testCreate()
146146 touch ($ this ->sourceDir . DS . $ src );
147147 $ this ->assertTrue (is_readable ($ this ->sourceDir . DS . $ src ));
148148 $ this ->assertFalse (is_readable ($ this ->destDir . DS . $ dest ));
149+ $ this ->strategy ->setCurrentMapping (array ($ src , $ dest ));
149150 $ this ->strategy ->create ($ src , $ dest );
150151 $ this ->assertTrue (is_readable ($ this ->destDir . DS . $ dest ));
151152 }
@@ -158,6 +159,7 @@ public function testCopyDirToDir()
158159 touch ($ this ->sourceDir . DS . $ src . DS . "local.xml " );
159160 $ this ->assertTrue (is_readable ($ this ->sourceDir . DS . $ src . DS . "local.xml " ));
160161 $ this ->assertFalse (is_readable ($ this ->destDir . DS . $ dest . DS . "local.xml " ));
162+ $ this ->strategy ->setCurrentMapping (array ($ src , $ dest ));
161163 $ this ->strategy ->create ($ src , $ dest );
162164 $ this ->assertTrue (is_readable ($ this ->destDir . DS . $ dest . DS . "local.xml " ));
163165 }
@@ -173,6 +175,7 @@ public function testGlobTargetDirExists()
173175
174176 $ testTarget = $ this ->destDir . DS . $ dest . DS . basename ($ globSource );
175177
178+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
176179 $ this ->strategy ->create ($ globSource , $ dest );
177180
178181 $ this ->assertFileType (dirname ($ testTarget ), self ::TEST_FILETYPE_DIR );
@@ -192,6 +195,7 @@ public function testTargetDirWithChildDirExists()
192195
193196 $ testTarget = $ this ->destDir . DS . $ dest . DS . basename ($ globSource ) . DS . basename ($ sourceContents );
194197
198+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
195199 $ this ->strategy ->create ($ globSource , $ dest );
196200 //passthru("tree {$this->destDir}/$dest");
197201
@@ -211,6 +215,7 @@ public function testTargetDirWithChildDirNotExists()
211215
212216 $ testTarget = $ this ->destDir . DS . $ dest . DS . basename ($ globSource ) . DS . basename ($ sourceContents );
213217
218+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
214219 $ this ->strategy ->create ($ globSource , $ dest );
215220 //passthru("tree {$this->destDir}/$dest");
216221
@@ -228,6 +233,7 @@ public function testGlobTargetDirDoesNotExists()
228233
229234 $ testTarget = $ this ->destDir . DS . $ dest ;
230235
236+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
231237 $ this ->strategy ->create ($ globSource , $ dest );
232238
233239 $ this ->assertFileType (dirname ($ testTarget ), self ::TEST_FILETYPE_DIR );
@@ -247,6 +253,7 @@ public function testGlobSlashDirectoryExists()
247253 $ testTarget = $ this ->destDir . DS . $ dest . basename ($ globSource );
248254
249255 // second create has to identify symlink
256+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
250257 $ this ->strategy ->create ($ globSource , $ dest );
251258
252259 $ this ->assertFileType (dirname ($ testTarget ), self ::TEST_FILETYPE_DIR );
@@ -265,6 +272,7 @@ public function testGlobSlashDirectoryDoesNotExists()
265272 $ testTarget = $ this ->destDir . DS . $ dest . basename ($ globSource );
266273
267274 // second create has to identify symlink
275+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
268276 $ this ->strategy ->create ($ globSource , $ dest );
269277
270278 $ this ->assertFileType (dirname ($ testTarget ), self ::TEST_FILETYPE_DIR );
@@ -284,6 +292,7 @@ public function testGlobWildcardTargetDirDoesNotExist()
284292
285293 $ dest = "targetdir " ;
286294
295+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
287296 $ this ->strategy ->create ($ globSource , $ dest );
288297
289298 $ targetDir = $ this ->destDir . DS . $ dest ;
@@ -312,6 +321,7 @@ public function testGlobWildcardTargetDirDoesExist()
312321 $ dest = "targetdir " ;
313322 $ this ->mkdir ($ this ->destDir . DS . $ dest );
314323
324+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
315325 $ this ->strategy ->create ($ globSource , $ dest );
316326
317327 $ targetDir = $ this ->destDir . DS . $ dest ;
@@ -348,6 +358,7 @@ public function testSourceAndTargetAreDirsDoNotExist()
348358 $ testTarget = $ this ->destDir . DS . $ dest ;
349359 $ testTargetContent = $ testTarget . DS . $ sourceDirContent ;
350360
361+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
351362 $ this ->strategy ->create ($ globSource , $ dest );
352363
353364 $ this ->assertFileExists ($ testTarget );
@@ -378,11 +389,12 @@ public function testSourceAndTargetAreDirsDoExist()
378389 $ this ->mkdir ($ this ->destDir . DS . $ dest );
379390
380391 // The target should be created INSIDE the target directory because the target dir exists exist
381- // 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
382393
383394 $ testTarget = $ this ->destDir . DS . $ dest . DS . basename ($ globSource );
384395 $ testTargetContent = $ testTarget . DS . $ sourceDirContent ;
385396
397+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
386398 $ this ->strategy ->create ($ globSource , $ dest );
387399
388400 $ this ->assertFileExists ($ testTarget );
0 commit comments