Page MenuHomePhabricator

Get rid of get[Formatter|Parser]Class methods in tests
Closed, ResolvedPublic

Description

Actual problems with these methods:

  • Hiding class names in strings and relying on PHP's dark magic to turn strings into objects makes it hard to find usages of these classes.
  • Abstract base classes for tests are considered evil. These patches are a step towards getting rid of the abstract base classes.
  • It's just not necessary. Just override the getInstance method. Done. This is sooo much simpler.

SerializerBaseTest::getClass patches:

ValueFormatterTestBase::getFormatterClass base patch:

ValueParserTestBase::getParserClass patches:

Event Timeline

thiemowmde claimed this task.
thiemowmde raised the priority of this task from to Unbreak Now!.
thiemowmde updated the task description. (Show Details)
thiemowmde added projects: Wikidata, DataValues.
thiemowmde added a subscriber: thiemowmde.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 10 2015, 2:24 PM
thiemowmde updated the task description. (Show Details)Mar 10 2015, 2:37 PM
thiemowmde set Security to None.
thiemowmde updated the task description. (Show Details)Mar 10 2015, 2:48 PM
Tobi_WMDE_SW lowered the priority of this task from Unbreak Now! to Normal.Mar 11 2015, 9:51 AM
daniel updated the task description. (Show Details)Mar 30 2015, 12:48 PM
daniel updated the task description. (Show Details)Mar 30 2015, 12:51 PM
daniel updated the task description. (Show Details)Mar 30 2015, 1:07 PM
daniel updated the task description. (Show Details)
daniel closed this task as Resolved.Mar 30 2015, 1:09 PM
daniel added a subscriber: daniel.

all listed changes were merged

daniel moved this task from Review to Done on the § Wikidata-Sprint-2015-03-24 board.