Problem/Motivation
In #2022931: Move drupal_var_export() to \Drupal\Component\Utility the Variable static class was created.
In #2002514: Deprecate debug(); remove references to _drupal_debug_message()., due to scope change, the unit tests were never written.
Proposed resolution
Write the tests.
Remaining tasks
User interface changes
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | interdiff.txt | 1 KB | mile23 |
| #14 | 2163245_14.patch | 2.69 KB | mile23 |
| #12 | interdiff.txt | 2.06 KB | mile23 |
| #12 | 2163245_12.patch | 2.49 KB | mile23 |
| #9 | 2163245_9.patch | 2.83 KB | mile23 |
Comments
Comment #1
mile23Le Patch.
Note that this test results in 100% code coverage, even though it shouldn't.
The bit at the end of Variable::export() that adds the prefix is always run, due to the way the $prefix default is set.
It should either set $prefix to NULL, or just always run str_replace() which is what's happening anyway.
Comment #2
ParisLiakos commentedlooks good, thanks for moving this here
lets just move those inline comments to a separate line and its good to go
Comment #3
mile23Moved the comments, plus a few other superficial coding standards changes.
Comment #4
ParisLiakos commentedthanks!
Comment #5
alexpottUnicode?
And can we get some @covers annotations too?
This is never used.
Comment #6
mile23How's that?
Comment #7
mile23Comment #8
dawehnerThis class does not exists.
Comment #9
mile23Doh! :-)
Changed to \Drupal\Component\Utility\Variable
Comment #12
mile23Removed getInfo(), changed non-stdClass object to be a locally-defined class in order to avoid dependency on PHPUnit's mocking system, changed @covers to reflect current standards.
Comment #13
dawehnerfor what? :)
Comment #14
mile23Ewps.
Improved docs, renamed test class to be more obvious.
Comment #15
dawehnerCool, thank you
Comment #16
alexpottCommitted 55240a0 and pushed to 8.x. Thanks!