|
18 | 18 |
|
19 | 19 | use Symfony\Component\Yaml\Yaml;
|
20 | 20 | use tool_dataflows\local\step\connector_sftp;
|
| 21 | +use tool_dataflows\local\step\connector_sftp_delete_file; |
21 | 22 | use tool_dataflows\local\step\connector_sftp_directory_file_list;
|
| 23 | +use tool_dataflows\local\step\connector_sftp_rename_file; |
22 | 24 |
|
23 | 25 | /**
|
24 | 26 | * Unit test for SFTP.
|
@@ -198,6 +200,32 @@ private function make_dataflow(string $target): dataflow {
|
198 | 200 | 'target' => $target,
|
199 | 201 | ]);
|
200 | 202 | $dataflow->add_step($step);
|
| 203 | + // Step Rename file. |
| 204 | + $step = new step(); |
| 205 | + $step->name = 'sftp_rename_file'; |
| 206 | + $step->type = connector_sftp_rename_file::class; |
| 207 | + $step->config = Yaml::dump([ |
| 208 | + 'host' => 'host', |
| 209 | + 'port' => 22, |
| 210 | + 'username' => 'username', |
| 211 | + 'password' => 'password', |
| 212 | + 'source' => 'sftp://unusedsource.txt', |
| 213 | + 'target' => 'sftp://otherfile.txt', |
| 214 | + ]); |
| 215 | + $dataflow->add_step($step); |
| 216 | + |
| 217 | + // Step Rename file. |
| 218 | + $step = new step(); |
| 219 | + $step->name = 'sftp_delete_file'; |
| 220 | + $step->type = connector_sftp_delete_file::class; |
| 221 | + $step->config = Yaml::dump([ |
| 222 | + 'host' => 'host', |
| 223 | + 'port' => 22, |
| 224 | + 'username' => 'username', |
| 225 | + 'password' => 'password', |
| 226 | + 'source' => 'sftp://unusedsource.txt', |
| 227 | + ]); |
| 228 | + $dataflow->add_step($step); |
201 | 229 |
|
202 | 230 | return $dataflow;
|
203 | 231 | }
|
|
0 commit comments