@@ -146,6 +146,7 @@ public function testCreate()
146
146
touch ($ this ->sourceDir . DS . $ src );
147
147
$ this ->assertTrue (is_readable ($ this ->sourceDir . DS . $ src ));
148
148
$ this ->assertFalse (is_readable ($ this ->destDir . DS . $ dest ));
149
+ $ this ->strategy ->setCurrentMapping (array ($ src , $ dest ));
149
150
$ this ->strategy ->create ($ src , $ dest );
150
151
$ this ->assertTrue (is_readable ($ this ->destDir . DS . $ dest ));
151
152
}
@@ -158,6 +159,7 @@ public function testCopyDirToDir()
158
159
touch ($ this ->sourceDir . DS . $ src . DS . "local.xml " );
159
160
$ this ->assertTrue (is_readable ($ this ->sourceDir . DS . $ src . DS . "local.xml " ));
160
161
$ this ->assertFalse (is_readable ($ this ->destDir . DS . $ dest . DS . "local.xml " ));
162
+ $ this ->strategy ->setCurrentMapping (array ($ src , $ dest ));
161
163
$ this ->strategy ->create ($ src , $ dest );
162
164
$ this ->assertTrue (is_readable ($ this ->destDir . DS . $ dest . DS . "local.xml " ));
163
165
}
@@ -173,6 +175,7 @@ public function testGlobTargetDirExists()
173
175
174
176
$ testTarget = $ this ->destDir . DS . $ dest . DS . basename ($ globSource );
175
177
178
+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
176
179
$ this ->strategy ->create ($ globSource , $ dest );
177
180
178
181
$ this ->assertFileType (dirname ($ testTarget ), self ::TEST_FILETYPE_DIR );
@@ -192,6 +195,7 @@ public function testTargetDirWithChildDirExists()
192
195
193
196
$ testTarget = $ this ->destDir . DS . $ dest . DS . basename ($ globSource ) . DS . basename ($ sourceContents );
194
197
198
+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
195
199
$ this ->strategy ->create ($ globSource , $ dest );
196
200
//passthru("tree {$this->destDir}/$dest");
197
201
@@ -211,6 +215,7 @@ public function testTargetDirWithChildDirNotExists()
211
215
212
216
$ testTarget = $ this ->destDir . DS . $ dest . DS . basename ($ globSource ) . DS . basename ($ sourceContents );
213
217
218
+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
214
219
$ this ->strategy ->create ($ globSource , $ dest );
215
220
//passthru("tree {$this->destDir}/$dest");
216
221
@@ -228,6 +233,7 @@ public function testGlobTargetDirDoesNotExists()
228
233
229
234
$ testTarget = $ this ->destDir . DS . $ dest ;
230
235
236
+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
231
237
$ this ->strategy ->create ($ globSource , $ dest );
232
238
233
239
$ this ->assertFileType (dirname ($ testTarget ), self ::TEST_FILETYPE_DIR );
@@ -247,6 +253,7 @@ public function testGlobSlashDirectoryExists()
247
253
$ testTarget = $ this ->destDir . DS . $ dest . basename ($ globSource );
248
254
249
255
// second create has to identify symlink
256
+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
250
257
$ this ->strategy ->create ($ globSource , $ dest );
251
258
252
259
$ this ->assertFileType (dirname ($ testTarget ), self ::TEST_FILETYPE_DIR );
@@ -265,6 +272,7 @@ public function testGlobSlashDirectoryDoesNotExists()
265
272
$ testTarget = $ this ->destDir . DS . $ dest . basename ($ globSource );
266
273
267
274
// second create has to identify symlink
275
+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
268
276
$ this ->strategy ->create ($ globSource , $ dest );
269
277
270
278
$ this ->assertFileType (dirname ($ testTarget ), self ::TEST_FILETYPE_DIR );
@@ -284,6 +292,7 @@ public function testGlobWildcardTargetDirDoesNotExist()
284
292
285
293
$ dest = "targetdir " ;
286
294
295
+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
287
296
$ this ->strategy ->create ($ globSource , $ dest );
288
297
289
298
$ targetDir = $ this ->destDir . DS . $ dest ;
@@ -312,6 +321,7 @@ public function testGlobWildcardTargetDirDoesExist()
312
321
$ dest = "targetdir " ;
313
322
$ this ->mkdir ($ this ->destDir . DS . $ dest );
314
323
324
+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
315
325
$ this ->strategy ->create ($ globSource , $ dest );
316
326
317
327
$ targetDir = $ this ->destDir . DS . $ dest ;
@@ -348,6 +358,7 @@ public function testSourceAndTargetAreDirsDoNotExist()
348
358
$ testTarget = $ this ->destDir . DS . $ dest ;
349
359
$ testTargetContent = $ testTarget . DS . $ sourceDirContent ;
350
360
361
+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
351
362
$ this ->strategy ->create ($ globSource , $ dest );
352
363
353
364
$ this ->assertFileExists ($ testTarget );
@@ -378,11 +389,12 @@ public function testSourceAndTargetAreDirsDoExist()
378
389
$ this ->mkdir ($ this ->destDir . DS . $ dest );
379
390
380
391
// 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
382
393
383
394
$ testTarget = $ this ->destDir . DS . $ dest . DS . basename ($ globSource );
384
395
$ testTargetContent = $ testTarget . DS . $ sourceDirContent ;
385
396
397
+ $ this ->strategy ->setCurrentMapping (array ($ globSource , $ dest ));
386
398
$ this ->strategy ->create ($ globSource , $ dest );
387
399
388
400
$ this ->assertFileExists ($ testTarget );
0 commit comments