Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Moved over from #1224838-14: Fix the inconsistency between filenames as array keys and array values.
We can do better than what we currently have.
Comments
Comment #1
tstoecklerComment #3
tstoecklerI don't get what I'm doing wrong. I get all greens with this one...
Comment #4
sunYou should be able to see "live" values on the testbot by squeezing in debug() lines.
btw, let's also rename $found to $expected.
Comment #5
tstoecklerThanks for the tip, I wasn't aware of that!
Let's try this one.
Comment #7
tstoecklerDamn you, unclean URLs!!!
Either way, this revealed a little bit of cruft which can be removed. Let's see if this one works.
Comment #8
sunEspecially the latter line is a coding style not used in Drupal. Looks like a simple if/else control structure would be more appropriate here.
Comment #9
tstoecklerHow about this one?
Comment #11
tstoecklerHow on earth did that pass locally?!!?!?
Let's try this one.
Comment #12
sunWe either need a different assignment variable here or we need to move that label munging simply out of the foreachs.
Comment #13
tstoecklerSorry, I thought I had checked the messages, but evidently I didn't:
Will reroll with $label moved out of the foreach.
Comment #14
tstoecklerThere we go.
Comment #15
tstoecklerGave this another look, and decided to commit this.
http://drupal.org/commitlog/commit/10030/abd2625f62f346613c7aedd74ad067e...
We already introduced one regression because of our poor current tests. This works and is definitely an improvement of the status quo. We can always refine in follow-ups. And at some point we're going to have to overhaul our test case anyway...