You are here

public function TestFileTransfer::removeFileJailed in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php \Drupal\Tests\system\Functional\FileTransfer\TestFileTransfer::removeFileJailed()

Removes a file.

Parameters

string $destination: The destination file to be removed.

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,
    ]);
  }
}