PHP code example of lamoda / codeception-flysystem

1. Go to this page and download the library: Download lamoda/codeception-flysystem library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lamoda / codeception-flysystem example snippets


$fileSystem = $this->tester->getFileSystem('sftp');

$fileSystem = $this->tester->getFileSystem('webdav');

$fileSystem = $this->tester->getFileSystem('s3');

$fileSystem = $this->tester->getFileSystem('sftp');

$fileSystem->clearDir('/path/to/dir');
$fileSystem->writeFile('test.txt', 'Hello world!');
$fileSystem->copyFile('test.txt', 'test_copy.txt');
$fileSystem->deleteFile('test.txt');

$files = $fileSystem->grabFileList('/path/to/dir');

$fileSystem->canSeeFile('test_copy.txt');
$fileSystem->cantSeeFile('test.txt');

$fileSystem->seeInFile('test_copy.txt', 'Hello');

$fileSystem->seeFilesCount('/path/to/dir', 1);

$fileSystem->seeFileFoundMatches('/copy$/', '/path/to/dir');
$fileSystem->dontSeeFileFoundMatches('/test$/', '/path/to/dir');