Commit 4e7ec019 authored by webchick's avatar webchick
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
...@@ -2,21 +2,17 @@ ...@@ -2,21 +2,17 @@
/** /**
* @file * @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\Core\Session\UserSession;
use Drupal\simpletest\WebTestBase;
/** /**
* Allows testing of the interactive installer. * Base class for testing the interactive installer.
*
* @todo Move majority of code into new Drupal\simpletest\InstallerTestBase.
*/ */
class InstallerTest extends WebTestBase { abstract class InstallerTestBase extends WebTestBase {
/** /**
* Custom settings.php values to write for a test run. * Custom settings.php values to write for a test run.
...@@ -69,14 +65,6 @@ class InstallerTest extends WebTestBase { ...@@ -69,14 +65,6 @@ class InstallerTest extends WebTestBase {
*/ */
protected $isInstalled = FALSE; protected $isInstalled = FALSE;
public static function getInfo() {
return array(
'name' => 'Installer tests',
'description' => 'Tests the interactive installer.',
'group' => 'Installer',
);
}
/** /**
* Overrides WebTestBase::setUp(). * Overrides WebTestBase::setUp().
*/ */
...@@ -211,14 +199,4 @@ protected function refreshVariables() { ...@@ -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 @@ ...@@ -7,12 +7,12 @@
namespace Drupal\system\Tests\Installer; namespace Drupal\system\Tests\Installer;
use Drupal\system\Tests\InstallerTest; use Drupal\simpletest\InstallerTestBase;
/** /**
* Tests the installer translation detection. * Tests the installer translation detection.
*/ */
class InstallerTranslationTest extends InstallerTest { class InstallerTranslationTest extends InstallerTestBase {
/** /**
* Overrides the language code in which to install Drupal. * Overrides the language code in which to install Drupal.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment