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

Files: 
CommentFileSizeAuthor
#4 entity_translation-strict-warnings-1991452-4.patch3.83 KBtwistor
PASSED: [[SimpleTest]]: [MySQL] 681 pass(es). View
#1 entity_translation-strict-warnings-1991452-1.patch3.05 KBtwistor
PASSED: [[SimpleTest]]: [MySQL] 681 pass(es). View

Comments

twistor’s picture

Status: Active » Needs review
FileSize
3.05 KB
PASSED: [[SimpleTest]]: [MySQL] 681 pass(es). View

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

FileSize
3.83 KB
PASSED: [[SimpleTest]]: [MySQL] 681 pass(es). View

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.