Follow-up to #2870457: Convert web tests to browser tests for page_cache module

Scope:
Drupal\page_cache\Tests\PageCacheTest

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

naveenvalecha created an issue. See original summary.

naveenvalecha’s picture

Title: Convert PageCacheTagsIntegrationTest web tests to browser tests for page_cache module » Convert PageCacheTest web tests to browser tests for page_cache module
Status: Active » Postponed

Updated Title

naveenvalecha’s picture

Status: Postponed » Needs review
FileSize
5.69 KB

This patch will fail as a couple of helper methods assertNoCacheTag and others are missing in AssertPageCacheContextsAndTagsTrait which are required for this test.

Also,
BTB drupalGetHeader function is calling getResponseHeader of Mink Session class which internally changing the string to lowercase which making couple of tests fail.

    public function getResponseHeader($name)
    {
        $headers = $this->driver->getResponseHeaders();

        $name = strtolower($name);
        $headers = array_change_key_case($headers, CASE_LOWER);

        if (!isset($headers[$name])) {
            return null;
        }

        return is_array($headers[$name]) ? $headers[$name][0] : $headers[$name];
    }

How about overriding this method in BTB?

I'll continue it tomorrow.
//Naveen

Status: Needs review » Needs work

The last submitted patch, 3: 2887393-2.patch, failed testing. View results

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

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now 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.

ApacheEx’s picture

Status: Needs work » Needs review

I've added a patch to the parent issue.
It seems this issue can be closed in favor of https://www.drupal.org/node/2870457#comment-12296590. Check it out.

ApacheEx’s picture

Status: Needs review » Closed (duplicate)

I think this issue doesn't make sense because all work is done here #2870457: Convert web tests to browser tests for page_cache module