1 | <?php |
||
8 | class SFTPTest extends WebTestCase |
||
9 | { |
||
10 | // test credentials took from here - http://www.sftp.net/public-online-sftp-servers |
||
11 | private $hostname = 'demo.wftpserver.com'; |
||
12 | private $port = '2222'; |
||
13 | private $login = 'demo-user'; |
||
14 | private $password = 'demo-user'; |
||
15 | |||
16 | /** @var SFTP $sftpService */ |
||
17 | private $sftpService; |
||
18 | |||
19 | /** |
||
20 | * Test getRemoteFilesList() |
||
21 | */ |
||
22 | public function testGetRemoteFilesList() |
||
29 | |||
30 | /** |
||
31 | * Test sendTo() |
||
32 | */ |
||
33 | public function testSendTo() |
||
34 | { |
||
35 | $this->sftpService->sendTo(dirname(__FILE__).'/../fixtures/b629855d08.png', '/upload/b629855d08.png'); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Test sendTo() |
||
40 | */ |
||
41 | public function testFetchFrom() |
||
45 | |||
46 | /** |
||
47 | * Set up fixtures for testing |
||
48 | */ |
||
49 | public function setUp() |
||
60 | |||
61 | /** |
||
62 | * Shut down test suite |
||
63 | */ |
||
64 | public function tearDown() |
||
72 | } |
||
73 |