function FileTransferTest::testJail
Same name and namespace in other branches
- 10 core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php \Drupal\Tests\system\Functional\FileTransfer\FileTransferTest::testJail()
- 9 core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php \Drupal\Tests\system\Functional\FileTransfer\FileTransferTest::testJail()
- 8.9.x core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php \Drupal\Tests\system\Functional\FileTransfer\FileTransferTest::testJail()
Tests the file transfer jail.
File
-
core/
modules/ system/ tests/ src/ Functional/ FileTransfer/ FileTransferTest.php, line 92
Class
- FileTransferTest
- Tests recursive file copy operations with the file transfer jail.
Namespace
Drupal\Tests\system\Functional\FileTransferCode
public function testJail() : void {
$source = $this->_buildFakeModule();
$this->testConnection
->copyDirectory($source, $this->root . '/' . PublicStream::basePath());
$this->expectException(FileTransferException::class);
$this->expectExceptionMessage('@directory is outside of the @jail');
$this->testConnection
->copyDirectory($source, sys_get_temp_dir());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.