UpgradePathTaxonomyTestCase::testTaxonomyUpgrade():

     // Ensure instance variables are getting through.
    foreach ($instances as $instance) {
      $this->assertTrue(isset($instance['required']), 'The required setting was preserved during the upgrade path.');
      $this->assertTrue($instance['description'], 'The description was preserved during the upgrade path');
     }

$instance is a string, not the field array. This causes failures on PHP 5.4+. There is a secondary problem, the upgrade test doesn't actually set an $instance['description'], and taxonomy_update_7004() doesn't set the required field in all cases.

Comments

twistor created an issue. See original summary.

twistor’s picture

Status: Active » Needs review
Parent issue: » #2620104: PHP 5.4 test failures
StatusFileSize
new9.5 KB
David_Rothstein’s picture

Status: Needs review » Needs work

Wow, nice find - that $instances is a very poorly-named variable! (But that's an existing problem which we don't have to fix here.)

There is a secondary problem, the upgrade test doesn't actually set an $instance['description']

Ah, this is confusing, but yes - $instance['description'] deliberately comes from the 'help' field on Drupal 6 vocabularies (not the 'description' field) so that's why the patch needs to set 'help'. However, it should do it in generate-d6-content.sh too (since that's where the database dump comes from).

That will also fix one case in the above patch where the help text was incorrect (not that it matters much).

The rest of the patch looks good to me.

David_Rothstein’s picture

Status: Needs work » Needs review
StatusFileSize
new10.08 KB
new1.2 KB

Looks like generate-d6-content.sh hasn't been run in years (probably not a surprise!) so running it produces lots of other cruft... but here's the patch with that update and just the changes to the database dump that we need for this issue.

David_Rothstein’s picture

David_Rothstein’s picture

Status: Needs review » Reviewed & tested by the community

I'm actually going to mark this RTBC myself since my changes were so small and didn't affect the actual functionality at all.

Will leave this for someone else to commit though.

fabianx’s picture

Issue tags: +Pending Drupal 7 commit

I was confused for a moment, because of the required => FALSE change, but that is just the default and that makes a lot of sense.

Marked for commit, will leave for a moment in that state and likely commit tomorrow.

  • Fabianx committed b6939aa on 7.x
    Issue #2660766 by David_Rothstein, twistor: UpgradePathTaxonomyTestCase...
fabianx’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Pending Drupal 7 commit +PHP 5.4

Committed and pushed to 7.x! Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.