Problem/Motivation

In Drupal 8.x, \Drupal\simpletest\WebTestBase does not declare or document the instance variable $cookies, though it's added to in curlHeaderCallback() every time the response conatins a Set-Cookie header.

Proposed resolution

Declare and document it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

Status: Active » Needs review
FileSize
749 bytes
pwolanin’s picture

Component: simpletest.module » documentation

This is really a documentation issue

pwolanin’s picture

Title: WebTestBase::$cookies is not declared or documented. » WebTestBase::$cookies and other vars not declared or documented.
FileSize
2.24 KB

And there are some more doc cleanup at the top of the file, including declaring the $container variable and fixing @file and removing some unused use statements.

Status: Needs review » Needs work

The last submitted patch, 3: 2262215-3.patch, failed testing.

pwolanin’s picture

Status: Needs work » Needs review
FileSize
2.28 KB

oops, conflict in the use section

tim.plunkett’s picture

Title: WebTestBase::$cookies and other vars not declared or documented. » WebTestBase and TestBase properties not declared or documented.
FileSize
8.4 KB

I checked these, and you're adding properties that actually exist in TestBase.
We can't really fix WebTestBase without fixing that first, and it's not that much more code, and its worth it to not document the properties in the wrong class.

sun’s picture

Hm. Not happy with that scope change...

To some extent of weirdness, those properties are not documented "on purpose"; as their current availability/visibility is a security issue of its own:

#2177079: Test classes have access to TestBase::$original* properties

I'm already working hard to fix and clean up all of this legacy code, but yeah, it takes time...

tim.plunkett’s picture

If you're feeling very strong about practicing "security by ignorance", than we can remove those original* properties.

But expanding this to TestBase is important, because those properties aren't specific to WebTestBase.

sun’s picture

Honestly, I don't know what the "right" approach is with regard to the current (terrible) situation.

I'd personally prefer to not document the original* properties, so people don't know what they are and #2177079 will hopefully hide/remove them ASAP.

No objections to documenting the other properties on TestBase. (even though most of them belong to WebTestBase in reality… but that can be cleaned up later on)

pwolanin’s picture

Issue tags: -

So this needs a re-roll to remove the $original* variables?

pwolanin’s picture

Status: Needs review » Needs work

Seems it needs work if those Ned to be removed

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Project: Drupal core » SimpleTest
Version: 8.9.x-dev » 8.x-3.x-dev
Component: documentation » Code
Issue tags: +Bug Smash Initiative

Simpletest was deprecated in Drupal 8.8 and removed from core in #3110862: Remove simpletest module from core. Moving to Simpletest Module