The generated cookie_domain in bootstrap.inc, conf_init() is not yet properly tested. This adds some tests for them in bootstrap.test.

Two notes:

  • I had to resort to $GLOBALS['cookie_domain'] instead of global $cookie_domain due to some unexpected behaviour.
  • There is a bug with the commented domains:
          // 'www2.drupal.org'        => '.drupal.org',
          // 'app.testing.drupal.org' => '.testing.drupal.org',
          // 'dev.drupal.co.uk'       => '.drupal.co.uk',
          // 'app.dev.drupal.co.uk'   => '.dev.drupal.co.uk',
    

    but i will open a separate issue once this test is added. Can we leave them in the patch here in the meantime?

Hopefully it is ok to put it under "Testing Party 08"...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arjenk’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

Status: Needs work » Needs review
catch’s picture

Status: Needs review » Needs work

Looks good, but it should use example.com, and the assertions need meaningful messages as the last argument to show in the testing UI what was asserted.

arjenk’s picture

Status: Needs work » Needs review
FileSize
3.76 KB

The assertions give now more interesting info, and we now use example.com.

catch’s picture

Component: tests » base system
Category: bug » task
Status: Needs review » Needs work

The whitespace is off in the $cookie_domain_test_cases array, and there's also some stuff commented out in there - which should either be uncommented or removed.

catch’s picture

Priority: Critical » Normal

Moving this out of the critical bugs queue - see #607038: Meta issue: fix gaps in code coverage.