function FileTransferAuthorizeFormTest::setUp
Same name in other branches
- 8.9.x core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php \Drupal\Tests\update\Functional\FileTransferAuthorizeFormTest::setUp()
- 10 core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php \Drupal\Tests\update\Functional\FileTransferAuthorizeFormTest::setUp()
- 11.x core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php \Drupal\Tests\update\Functional\FileTransferAuthorizeFormTest::setUp()
Overrides UpdateUploaderTestBase::setUp
File
-
core/
modules/ update/ tests/ src/ Functional/ FileTransferAuthorizeFormTest.php, line 27
Class
- FileTransferAuthorizeFormTest
- Tests the Update Manager module upload via authorize.php functionality.
Namespace
Drupal\Tests\update\FunctionalCode
protected function setUp() : void {
parent::setUp();
$admin_user = $this->drupalCreateUser([
'administer modules',
'administer software updates',
]);
$this->drupalLogin($admin_user);
// Create a local cache so the module is not downloaded from drupal.org.
$cache_directory = _update_manager_cache_directory(TRUE);
foreach ([
'.tar.gz',
'.zip',
] as $extension) {
$filename = 'update_test_new_module' . $extension;
copy(__DIR__ . '/../../update_test_new_module/8.x-1.0/' . $filename, $cache_directory . '/' . $filename);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.