Skip to content
Snippets Groups Projects
Commit 4e7ec019 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2175459 by sun: Convert Drupal\system\Tests\InstallerTest into a new...

Issue #2175459 by sun: Convert Drupal\system\Tests\InstallerTest into a new Drupal\simpletest\InstallerTestBase.
parent 06e6e923
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -2,21 +2,17 @@
/**
* @file
* Contains \Drupal\system\Tests\InstallerTest.
* Contains \Drupal\simpletest\InstallerTestBase.
*/
namespace Drupal\system\Tests;
namespace Drupal\simpletest;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Session\UserSession;
use Drupal\simpletest\WebTestBase;
/**
* Allows testing of the interactive installer.
*
* @todo Move majority of code into new Drupal\simpletest\InstallerTestBase.
* Base class for testing the interactive installer.
*/
class InstallerTest extends WebTestBase {
abstract class InstallerTestBase extends WebTestBase {
/**
* Custom settings.php values to write for a test run.
......@@ -69,14 +65,6 @@ class InstallerTest extends WebTestBase {
*/
protected $isInstalled = FALSE;
public static function getInfo() {
return array(
'name' => 'Installer tests',
'description' => 'Tests the interactive installer.',
'group' => 'Installer',
);
}
/**
* Overrides WebTestBase::setUp().
*/
......@@ -211,14 +199,4 @@ protected function refreshVariables() {
}
}
/**
* Ensures that the user page is available after every test installation.
*/
public function testInstaller() {
$this->assertUrl('user/1');
$this->assertResponse(200);
// Confirm that we are logged-in after installation.
$this->assertText($this->root_user->getUsername());
}
}
<?php
/**
* @file
* Contains \Drupal\system\Tests\Installer\InstallerTest.
*/
namespace Drupal\system\Tests\Installer;
use Drupal\simpletest\InstallerTestBase;
/**
* Allows testing of the interactive installer.
*/
class InstallerTest extends InstallerTestBase {
public static function getInfo() {
return array(
'name' => 'Installer test',
'description' => 'Tests the interactive installer.',
'group' => 'Installer',
);
}
/**
* Ensures that the user page is available after installation.
*/
public function testInstaller() {
$this->assertUrl('user/1');
$this->assertResponse(200);
// Confirm that we are logged-in after installation.
$this->assertText($this->root_user->getUsername());
}
}
......@@ -7,12 +7,12 @@
namespace Drupal\system\Tests\Installer;
use Drupal\system\Tests\InstallerTest;
use Drupal\simpletest\InstallerTestBase;
/**
* Tests the installer translation detection.
*/
class InstallerTranslationTest extends InstallerTest {
class InstallerTranslationTest extends InstallerTestBase {
/**
* Overrides the language code in which to install Drupal.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment