Replace DrupalWebTestCase browser with browser.inc

boombatower - August 19, 2009 - 07:00
Project:SimpleTest
Version:7.x-2.x-dev
Component:Code
Category:task
Priority:normal
Assigned:boombatower
Status:needs review
Description

Has some catch up work to do in terms of features, at least #553276: Add HTTP authentication support, not sure what else.

#1

boombatower - August 21, 2009 - 02:42
Assigned to:Anonymous» boombatower
Status:postponed» active

There is a patch for the issue...so I am going to start on this.

Items to accomplish:

  • Remove all non-assertion web related code from DrupalWebTestCase.
  • Provide browser instance for tests.
  • Make necessary changes to browser.inc to allow all the same assertions that DrupalWebTestCase makes during requests and such.

The current code:

<?php
$this
->drupalGet('node');
?>

The new format for tests will look something like this:

<?php
$this
->browser->get(url('node', array('absolute' => TRUE));
?>

or
<?php
$this
->get('node');
?>

or
<?php
$this
->browserGet('node');
?>

That latter two being wrappers for $browser->get() and will run url() on anything passed to them, just like drupalGet(). The browser requires an absolute url.

That or we make the browser accept none-absolute in some manor.

#2

boombatower - August 21, 2009 - 03:01

Smart idea from webchick, leave as drupalGet() for now.

#4

boombatower - August 21, 2009 - 03:54

Very early patch.

AttachmentSize
553278-replace-dwtc-browser.patch 3.98 KB

#5

boombatower - November 9, 2009 - 21:06
Project:Drupal» Browser
Version:7.x-dev» 7.x-1.x-dev
Component:browser system» Code

Move to Browser module for further development.

#6

boombatower - November 11, 2009 - 06:30
Project:Browser» SimpleTest
Version:7.x-1.x-dev» 7.x-2.x-dev

Move to SimpleTest.

#7

boombatower - November 11, 2009 - 06:31

Update for tonight.

AttachmentSize
553278-replace-dwtc-browser.patch 4.52 KB

#8

boombatower - November 11, 2009 - 06:31
Status:active» needs review

#9

boombatower - November 25, 2009 - 23:59

drupalGet() and drupalPost() work!

Left:
* Convert page related assertions.
* Provide drupalHeader() equivalent and related.
* Create Drupal HEAD patch to let bot run on all tests.

AttachmentSize
553278-replace-dwtc-browser.patch 21.79 KB
 
 

Drupal is a registered trademark of Dries Buytaert.