Add staging test case to allow for "atomic" tests that can run against production and staging sites and thus do not replicate the database locally.

Comments

boombatower’s picture

Assigned: Unassigned » boombatower
Status: Active » Needs review
StatusFileSize
new4.76 KB
boombatower’s picture

Wrong base class before.

boombatower’s picture

StatusFileSize
new4.76 KB

Patch would be nice.

boombatower’s picture

StatusFileSize
new4.78 KB

Allow for $this->stagingUrl to be set in test itself instead of variable.

boombatower’s picture

I gotta say, pretty slick.

class DrupalRedesignTestCase extends DrupalStageTestCase {

  public static function getInfo() {
    return array(
      'name' => 'AAA',
      'description' => '...',
      'group' => 'AAA',
    );
  }

  protected function setUp() {
    $this->stagingUrl = 'http://staging6.drupal.org';
    $this->httpauth_credentials = 'drupal:drupal';

    parent::setUp();
  }

  protected function testFoo() {
    $this->drupalGet('about');
    $this->assertText('Documentation');
  }
}
scor’s picture

shouldn't this go into the simpletest-7.x-2.x issue queue for now so it can get committed? We don't have a Drupal 8.x committer yet and I bet when the time comes, the code from simpletest-7.x-2.x can be considered for inclusion into core 8.x.

boombatower’s picture

Project: Drupal core » SimpleTest
Version: 8.x-dev » 7.x-2.x-dev
Component: simpletest.module » Code
Status: Needs review » Fixed

Actually it has already been committed in 7.x-2.x so lets just move it there and more it fixed. We will need a general issue it merge 7.x-2.x with 8.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

scor’s picture

For the records, DrupalStageTestCase was renamed to DrupalRemoteTestCase