EntityTranslationMenuTranslationTestCase::createPage() and EntityTranslationMenuTranslationTestCase::createTranslation() are incompatible with their parents which throws strict warning all over the place.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

twistor’s picture

Status: Active » Needs review
FileSize
3.05 KB

Here is a simple approach, rename createPage() to createMenuPage() and createTranslation() to createMenuTranslation(). There might be a better, deeper re-factoring that could be done, I didn't really dig into the tests.

bforchhammer’s picture

I'd rather keep the current method names and make them private or protected (that should work as well, no?); Hm, can we do that with the recommended PHP version for D7?

twistor’s picture

That won't help. It's not a visibility problem. The idea is that you should be able to use a class or its children interchangeably, so no method may have more required parameters than its parent method.

twistor’s picture

This should work as well.

bforchhammer’s picture

Status: Needs review » Fixed

Okay, works for me. Committed #4, thanks!

Status: Fixed » Closed (fixed)

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

  • Commit 274769d on 7.x-1.x, factory, et-fc, revisions authored by twistor, committed by bforchhammer:
    Issue #1991452 by twistor: Fixed Strict warnings on testing page.
    

  • Commit 274769d on 7.x-1.x, factory, et-fc, revisions, workbench authored by twistor, committed by bforchhammer:
    Issue #1991452 by twistor: Fixed Strict warnings on testing page.