public function FeedsParaMapperWebTestCase::copyFile in Feeds Paragraphs 7
Copies a file.
Parameters
string $source: The path of the source file.
string $dest: The path of the destination directory along with the file name.
1 call to FeedsParaMapperWebTestCase::copyFile()
- FeedsParaMapperWebTestCase::setUp in tests/
FeedsParaMapperWebTestCase.test - Prepares the test environment.
File
- tests/
FeedsParaMapperWebTestCase.test, line 744 - Common functionality for all Paragraphs Mapper tests.
Class
- FeedsParaMapperWebTestCase
- Test basic functionality via DrupalWebTestCase.
Code
public function copyFile($source, $dest) {
$full_path = $this
->getProjectPath() . $source;
$file = file_unmanaged_copy($full_path, $dest);
$message = format_string("The file @source copied successfully", array(
'@source' => $source,
));
$this
->assertTrue(is_string($file), $message);
}