Closed (fixed)
Project:
Drupal core
Version:
8.9.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2020 at 09:21 UTC
Updated:
10 Aug 2020 at 08:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hardik_patel_12 commentedComment #3
hardik_patel_12 commentedKindly review a patch.
Comment #5
s_bhandari commentedComment #6
s_bhandari commentedAdded a patch for the same.
Comment #7
ravi.shankar commentedComment #8
s_bhandari commentedComment #9
s_bhandari commentedComment #10
avpadernoComment #11
avpaderno$method_definitionswas added in #1862202: Objectify the language system, which changed the code ofPathProcessorTest::setUp()to the following one. (The relative commit is 0b55dcd84190efb23e9db99e9fc135979aeec9bc.)Effectively,
$method_definitionswas used.Successive commits changed that code, removing the
$language_manager->expects($this->any())->method('getNegotiationMethods')->will($this->returnValue($method_definitions));part. More exactly, it happened in commit 03fd77c842e3606da859e5bb7c04b2da0b85c720, done for #2927806: Use PHPUnit 6 for testing when PHP version >= 7.2. The committed patches contains the following lines.It removes the line using
$method_definitions, but not the lines initializing that variable.The lines initializing
$method_definitionsare therefore a left-over that should have been removed from that patch.The patch provided here is correct.
Comment #13
avpadernoComment #14
jungle#12 is a random failure. Setting back to RTBC.
Comment #15
alexpottNice sleuthing @kiamlaluno - and that was removed because these methods don't exist on the language manager and PHPUnit 6 correctly reported the error.
However looking carefully at this - this means we can also remove
and
As these lines are doing nothing too...
Comment #16
jungleThanks @alexpott for the closing look.
Addressing #15, tested the attached patch on my local, it passes. So i will cycle back and set back to RTBC once the CI run passes if no one does.
Comment #17
jungleIt's GREEN
Comment #18
alexpottCommitted and pushed 72cb9b6f06 to 9.1.x and 45f6306200 to 9.0.x and 20f191f34e to 8.9.x. Thanks!
Backported to 8.9.x to keep the tests aligned.
Comment #22
alexpott