Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
simpletest.module
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
2 Aug 2012 at 23:49 UTC
Updated:
29 Jul 2014 at 20:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
tim.plunkettHad to do some trickery in SimpleTestTest.php, please review it carefully.
Comment #2
kid_icarus commentedThis is the only change I'm uncertain of. Instead of $this::$modules, would self::$modules be a better choice? I'm kind of a OO noob so I wouldn't know better, but my reasoning lies in example #2 at http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php
and from http://stackoverflow.com/a/151976/1097146
Since in this case we're altering the class definition instead of an instantiation, I think self:: may be better?
Comment #3
kid_icarus commentedSorry, I'm not sure if this needs work or not, it definitely needs more review than my two noob cents :)
Comment #4
tim.plunkettWithout any patch:
SimpleTest functionality 114 passes, 0 fails, 0 exceptions, and 28 debug messages
With the patch from #1:
SimpleTest functionality 114 passes, 0 fails, 0 exceptions, and 28 debug messages
With the patch from #1, but with $self::$modules instead of $this::modules:
SimpleTest functionality 87 passes, 23 fails, 42 exceptions, and 26 debug messages
Basically, $self::$modules is read-only. $this::$modules lets you change the value.
Comment #5
kid_icarus commented@tim.plunket
I think you had a typo there. Instead of $self::$modules, it should be self::$modules.
I created a patch that uses self::$modules instead and it passed for me locally.
Comment #6
tim.plunkettOh, hah!
That does make sense.
Comment #7
tim.plunkett