1010class CopyFilesTaskIntegrationTest extends \PHPUnit \Framework \TestCase
1111{
1212
13- const TEMP_DIRECTORY_PATH = __DIR__ . '/temp ' ;
13+ private const TEMP_DIRECTORY_PATH = __DIR__ . '/temp ' ;
1414
15- public function testCopyFile ()
15+ public function testCopyFile (): void
1616 {
1717 $ sourceFilePath = self ::TEMP_DIRECTORY_PATH . '/foo ' ;
1818 file_put_contents ($ sourceFilePath , 'FOO ' );
@@ -29,7 +29,7 @@ public function testCopyFile()
2929 $ tester ->assertLogMessageRegExp ('~Copying.+/foo.+->.+/foo-copy~ ' , $ target , Project::MSG_INFO );
3030 }
3131
32- public function testCopyFileWithAbsolutePath ()
32+ public function testCopyFileWithAbsolutePath (): void
3333 {
3434 $ sourceFilePath = self ::TEMP_DIRECTORY_PATH . '/foo ' ;
3535 file_put_contents ($ sourceFilePath , 'FOO ' );
@@ -46,7 +46,7 @@ public function testCopyFileWithAbsolutePath()
4646 $ tester ->assertLogMessageRegExp ('~Copying.+/foo.+->.+/foo-copy~ ' , $ target , Project::MSG_INFO );
4747 }
4848
49- public function testTargetFileExists ()
49+ public function testTargetFileExists (): void
5050 {
5151 $ sourceFilePath = self ::TEMP_DIRECTORY_PATH . '/new ' ;
5252 file_put_contents ($ sourceFilePath , 'NEW ' );
@@ -62,7 +62,7 @@ public function testTargetFileExists()
6262 $ tester ->assertLogMessageRegExp ('~/existing.+already exists.+SKIPPING~ ' , $ target , Project::MSG_INFO );
6363 }
6464
65- public function testTargetFileExistsSkip ()
65+ public function testTargetFileExistsSkip (): void
6666 {
6767 $ sourceFilePath = self ::TEMP_DIRECTORY_PATH . '/new ' ;
6868 file_put_contents ($ sourceFilePath , 'NEW ' );
@@ -78,7 +78,7 @@ public function testTargetFileExistsSkip()
7878 $ tester ->assertLogMessageRegExp ('~/existing.+already exists.+SKIPPING~ ' , $ target , Project::MSG_INFO );
7979 }
8080
81- public function testTargetFileExistsReplace ()
81+ public function testTargetFileExistsReplace (): void
8282 {
8383 $ sourceFilePath = self ::TEMP_DIRECTORY_PATH . '/new ' ;
8484 file_put_contents ($ sourceFilePath , 'NEW ' );
@@ -93,7 +93,7 @@ public function testTargetFileExistsReplace()
9393 $ tester ->assertLogMessageRegExp ('~/existing.+already exists~ ' , $ target , Project::MSG_VERBOSE );
9494 }
9595
96- public function testTargetFileExistsFail ()
96+ public function testTargetFileExistsFail (): void
9797 {
9898 $ sourceFilePath = self ::TEMP_DIRECTORY_PATH . '/new ' ;
9999 file_put_contents ($ sourceFilePath , 'NEW ' );
@@ -110,7 +110,7 @@ public function testTargetFileExistsFail()
110110 $ tester ->assertLogMessageRegExp ('~/existing.+already exists~ ' , $ target , Project::MSG_ERR );
111111 }
112112
113- public function testCopyMultipleFiles ()
113+ public function testCopyMultipleFiles (): void
114114 {
115115 $ sourceFooFilePath = self ::TEMP_DIRECTORY_PATH . '/foo ' ;
116116 file_put_contents ($ sourceFooFilePath , 'FOO ' );
@@ -135,7 +135,7 @@ public function testCopyMultipleFiles()
135135 $ tester ->assertLogMessageRegExp ('~Copying.+/bar.+->.+/bar-copy~ ' , $ target , Project::MSG_INFO );
136136 }
137137
138- public function testReplaceMultipleFilesWithExistingTargets ()
138+ public function testReplaceMultipleFilesWithExistingTargets (): void
139139 {
140140 $ sourceFooFilePath = self ::TEMP_DIRECTORY_PATH . '/foo-new ' ;
141141 file_put_contents ($ sourceFooFilePath , 'FOO-NEW ' );
@@ -160,7 +160,7 @@ public function testReplaceMultipleFilesWithExistingTargets()
160160 $ tester ->assertLogMessageRegExp ('~/bar-existing.+already exists~ ' , $ target , Project::MSG_VERBOSE );
161161 }
162162
163- public function testCopyMultipleFilesWithExistingTargetsUsingDifferentModes ()
163+ public function testCopyMultipleFilesWithExistingTargetsUsingDifferentModes (): void
164164 {
165165 $ sourceSkipFilePath = self ::TEMP_DIRECTORY_PATH . '/skip-new ' ;
166166 file_put_contents ($ sourceSkipFilePath , 'SKIP-NEW ' );
@@ -192,7 +192,7 @@ public function testCopyMultipleFilesWithExistingTargetsUsingDifferentModes()
192192 $ this ->assertSame ('DEFAULT-EXISTING ' , file_get_contents ($ targetDefaultFilePath ));
193193 }
194194
195- public function testCopyMultipleFilesWithExistingTargetsUsingDifferentModesWithReplaceFallback ()
195+ public function testCopyMultipleFilesWithExistingTargetsUsingDifferentModesWithReplaceFallback (): void
196196 {
197197 $ sourceSkipFilePath = self ::TEMP_DIRECTORY_PATH . '/skip-new ' ;
198198 file_put_contents ($ sourceSkipFilePath , 'SKIP-NEW ' );
@@ -225,7 +225,7 @@ public function testCopyMultipleFilesWithExistingTargetsUsingDifferentModesWithR
225225 $ tester ->assertLogMessageRegExp ('~/default-existing.+already exists~ ' , $ target , Project::MSG_VERBOSE );
226226 }
227227
228- public function testCopyNonExistentFile ()
228+ public function testCopyNonExistentFile (): void
229229 {
230230 $ tester = new PhingTester (__DIR__ . '/copy-files-task-integration-test.xml ' );
231231 $ target = __FUNCTION__ ;
@@ -235,7 +235,7 @@ public function testCopyNonExistentFile()
235235 $ tester ->assertLogMessageRegExp ('~XXX.+does not exist~ ' , $ target , Project::MSG_ERR );
236236 }
237237
238- public function testCopyMultipleNonExistentFiles ()
238+ public function testCopyMultipleNonExistentFiles (): void
239239 {
240240 $ tester = new PhingTester (__DIR__ . '/copy-files-task-integration-test.xml ' );
241241 $ target = __FUNCTION__ ;
@@ -246,7 +246,7 @@ public function testCopyMultipleNonExistentFiles()
246246 $ tester ->assertLogMessageRegExp ('~BAR.+does not exist~ ' , $ target , Project::MSG_ERR );
247247 }
248248
249- public function testCopyFileToNonExistingDirectory ()
249+ public function testCopyFileToNonExistingDirectory (): void
250250 {
251251 $ sourceFilePath = self ::TEMP_DIRECTORY_PATH . '/foo ' ;
252252 file_put_contents ($ sourceFilePath , 'FOO ' );
@@ -263,7 +263,7 @@ public function testCopyFileToNonExistingDirectory()
263263 $ tester ->assertLogMessageRegExp ('~/foo.+cannot be copied.+/foo-copy~ ' , $ target , Project::MSG_ERR );
264264 }
265265
266- public function testMissingCopyFileElement ()
266+ public function testMissingCopyFileElement (): void
267267 {
268268 $ tester = new PhingTester (__DIR__ . '/copy-files-task-integration-test.xml ' );
269269 $ target = __FUNCTION__ ;
@@ -274,7 +274,7 @@ public function testMissingCopyFileElement()
274274 $ tester ->executeTarget ($ target );
275275 }
276276
277- public function testMissingSource ()
277+ public function testMissingSource (): void
278278 {
279279 $ tester = new PhingTester (__DIR__ . '/copy-files-task-integration-test.xml ' );
280280 $ target = __FUNCTION__ ;
@@ -285,7 +285,7 @@ public function testMissingSource()
285285 $ tester ->executeTarget ($ target );
286286 }
287287
288- public function testMissingTarget ()
288+ public function testMissingTarget (): void
289289 {
290290 $ tester = new PhingTester (__DIR__ . '/copy-files-task-integration-test.xml ' );
291291 $ target = __FUNCTION__ ;
@@ -296,7 +296,7 @@ public function testMissingTarget()
296296 $ tester ->executeTarget ($ target );
297297 }
298298
299- public function testInvalidFileExistsMode ()
299+ public function testInvalidFileExistsMode (): void
300300 {
301301 $ tester = new PhingTester (__DIR__ . '/copy-files-task-integration-test.xml ' );
302302 $ target = __FUNCTION__ ;
0 commit comments