function TestFileTransfer::removeFileJailed

Same name in other branches
  1. 7.x modules/simpletest/tests/filetransfer.test \TestFileTransfer::removeFileJailed()
  2. 9 core/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php \Drupal\Tests\system\Functional\FileTransfer\TestFileTransfer::removeFileJailed()
  3. 10 core/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php \Drupal\Tests\system\Functional\FileTransfer\TestFileTransfer::removeFileJailed()
  4. 11.x core/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php \Drupal\Tests\system\Functional\FileTransfer\TestFileTransfer::removeFileJailed()

Overrides FileTransfer::removeFileJailed

File

core/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php, line 49

Class

TestFileTransfer
Mock FileTransfer object for test case.

Namespace

Drupal\Tests\system\Functional\FileTransfer

Code

public function removeFileJailed($destination) {
    if (!ftp_delete($this->connection, $item)) {
        throw new FileTransferException('Unable to remove the file @file.', NULL, [
            '@file' => $item,
        ]);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.