Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
simpletest.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2013 at 19:31 UTC
Updated:
29 Jul 2014 at 22:36 UTC
Jump to comment: Most recent file
Comments
Comment #1
xanoComment #2
corvus_ch commentedI would use the $GLOBALS['user'] notation here but I wonder where the
global $usergets populated during simpletest. For we consider this deprecated, we should try to replace it instead of use it.Comment #3
xanoUnitTestBase might not have to be altered. In that case, why is TestBase::rebuildContainer() only used by WebTestBase and nothing else? Also, should DrupalUnitTestBase also be patched to provide a request account?
Comment #4
xanoThis happens in TestBase::prepareEnvironment().
Comment #6
pwolanin commentedfixing title
Comment #7
pwolanin commentedWe are seeing other test failures due to this as we try to switch to using the _account attribute in patches
Comment #8
pwolanin commentedbumping priority - this is blocking attempts to move access checks to use $account->hasPermission() in other patches
Comment #9
pwolanin commentedTrying again with _account
Comment #11
pwolanin commentedEntityReferenceSelectionAccessTest fails - the fix is the same as already done for patch in #26: #2004086: The Request service must be synthetic
Comment #12
pwolanin commentedComment #13
dawehnerWe might could add a @todo how to remove the global user properly (i guess we want to always store the current global user on the test object?)
Comment #14
xjm@dawehner You mean #2047951: [META] Remove calls to deprecated global $user and $GLOBALS['user']?
Comment #15
webchickLooks straight-forward enough. Committed and pushed to 8.x. Thanks!
Comment #16
webchickAhem. And by that I meant... "no longer applies." :P
Comment #17
webchickugh. ignore me.