Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

The - private $baseContainer; is just cruft I nuked.

klausi’s picture

Status: Needs review » Closed (duplicate)

duplicate of #1842726: Transliteration component must not contain drupal_alter(). Please post patches to the issue that caused the broken HEAD.

chx’s picture

Status: Closed (duplicate) » Needs review

Then I would need to reopen the bootstrap kernel patch which I won't.

Edit: the patch name comes from not having an issue id so I just thrown in some random garbage. Whatever to get the issue done at 5am.

chx’s picture

To clarify, tests use $this->container which is set by TestBase to drupal_container() which worked fine until some test like the transliteration test decided to pull something out of CoreBundle -- and as $this->container was not reassigned after Kernel init, that service is not there. The transliteration test is not guilty. I think I am.

chx’s picture

WebTestBase calls TestBase::rebuildContainer which does

    $this->kernel = new DrupalKernel('testing', FALSE, drupal_classloader(), FALSE);
    $this->kernel->boot();
    $this->container = drupal_container();

so those tests contain an up to date container. Now DrupalUnitTestBase does too by storing the container as it is being built. You know, PHP objects, they are passed around by handler so as the build finishes it's the exact same object in drupal_container and this->container.

xjm’s picture

Can we add an inline comment explaining it? :)

chx’s picture

xjm’s picture

Status: Needs review » Reviewed & tested by the community

Now that I understand it, the fix makes sense. Thanks chx!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

LOL @ patch name. :)

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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