diff --git a/core/modules/update/src/Tests/UpdateTestBase.php b/core/modules/update/src/Tests/UpdateTestBase.php index fc39d1a3cc..99312208a9 100644 --- a/core/modules/update/src/Tests/UpdateTestBase.php +++ b/core/modules/update/src/Tests/UpdateTestBase.php @@ -2,6 +2,8 @@ namespace Drupal\update\Tests; +@trigger_error(__NAMESPACE__ . '\UpdateTestBase is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\update\Functional\UpdateTestBase', E_USER_DEPRECATED); + use Drupal\Core\DrupalKernel; use Drupal\Core\Url; use Drupal\simpletest\WebTestBase; @@ -22,6 +24,9 @@ * (via the 'update_test_xml_map' variable), and then performs a series of * assertions that the report matches our expectations given the specific * initial state and availability scenario. + * + * @deprecated Scheduled for removal in Drupal 9.0.0. + * Use \Drupal\Tests\update\Functional\UpdateTestBase instead. */ abstract class UpdateTestBase extends WebTestBase { diff --git a/core/modules/update/src/Tests/FileTransferAuthorizeFormTest.php b/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php similarity index 92% rename from core/modules/update/src/Tests/FileTransferAuthorizeFormTest.php rename to core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php index 9d1819fca3..d768b06d81 100644 --- a/core/modules/update/src/Tests/FileTransferAuthorizeFormTest.php +++ b/core/modules/update/tests/src/Functional/FileTransferAuthorizeFormTest.php @@ -1,6 +1,6 @@ standardTests(); $this->drupalGet('admin/reports/updates'); $this->clickLink(t('Check manually')); + $this->drupalGet('admin/reports/updates'); $this->assertNoText(t('Security update required!')); $this->assertRaw(\Drupal::l("8.$minor_version.1" . $extra_version, Url::fromUri("http://example.com/drupal-8-$minor_version-1$extra_version-release")), 'Link to release appears.'); $this->assertRaw(\Drupal::l(t('Download'), Url::fromUri("http://example.com/drupal-8-$minor_version-1$extra_version.tar.gz")), 'Link to download appears.'); @@ -139,6 +143,7 @@ public function testMajorUpdateAvailable() { $this->standardTests(); $this->drupalGet('admin/reports/updates'); $this->clickLink(t('Check manually')); + $this->drupalGet('admin/reports/updates'); $this->assertNoText(t('Security update required!')); $this->assertRaw(\Drupal::l('9.0.0', Url::fromUri("http://example.com/drupal-9-0-0-release")), 'Link to release appears.'); $this->assertRaw(\Drupal::l(t('Download'), Url::fromUri("http://example.com/drupal-9-0-0.tar.gz")), 'Link to download appears.'); diff --git a/core/modules/update/src/Tests/UpdateDeleteFileIfStaleTest.php b/core/modules/update/tests/src/Functional/UpdateDeleteFileIfStaleTest.php similarity index 96% rename from core/modules/update/src/Tests/UpdateDeleteFileIfStaleTest.php rename to core/modules/update/tests/src/Functional/UpdateDeleteFileIfStaleTest.php index 99499d77c2..601a6cc2ff 100644 --- a/core/modules/update/src/Tests/UpdateDeleteFileIfStaleTest.php +++ b/core/modules/update/tests/src/Functional/UpdateDeleteFileIfStaleTest.php @@ -1,6 +1,6 @@ drupalGet('admin/reports/updates'); $this->clickLink(t('Check manually')); + $this->drupalGet('admin/reports/updates'); } /** diff --git a/core/modules/update/src/Tests/UpdateUploadTest.php b/core/modules/update/tests/src/Functional/UpdateUploadTest.php similarity index 96% rename from core/modules/update/src/Tests/UpdateUploadTest.php rename to core/modules/update/tests/src/Functional/UpdateUploadTest.php index 80d3f15d29..6096620062 100644 --- a/core/modules/update/src/Tests/UpdateUploadTest.php +++ b/core/modules/update/tests/src/Functional/UpdateUploadTest.php @@ -1,10 +1,11 @@ $validArchiveFile, ]; @@ -63,7 +68,7 @@ public function testUploadModule() { $moduleUpdater = $updaters['module']['class']; $installedInfoFilePath = $this->container->get('update.root') . '/' . $moduleUpdater::getRootDirectoryRelativePath() . '/update_test_new_module/update_test_new_module.info.yml'; $this->assertFalse(file_exists($installedInfoFilePath), 'The new module does not exist in the filesystem before it is installed with the Update Manager.'); - $validArchiveFile = __DIR__ . '/../../tests/update_test_new_module/8.x-1.0/update_test_new_module.tar.gz'; + $validArchiveFile = __DIR__ . '/../../update_test_new_module/8.x-1.0/update_test_new_module.tar.gz'; $edit = [ 'files[project_upload]' => $validArchiveFile, ];